{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "dfd018a2-a62d-4805-8c3e-8215c22568c3",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:13:46.275151Z",
     "iopub.status.busy": "2022-10-21T00:13:46.274732Z",
     "iopub.status.idle": "2022-10-21T00:13:46.289467Z",
     "shell.execute_reply": "2022-10-21T00:13:46.288961Z",
     "shell.execute_reply.started": "2022-10-21T00:13:46.275105Z"
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Pandas Version : 1.4.4\n",
      "Pandas Version : 2.4.2\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "    <div class=\"bk-root\">\n",
       "        <a href=\"https://bokeh.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n",
       "        <span id=\"1945\">Loading BokehJS ...</span>\n",
       "    </div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "(function(root) {\n",
       "  function now() {\n",
       "    return new Date();\n",
       "  }\n",
       "\n",
       "  const force = true;\n",
       "\n",
       "  if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n",
       "    root._bokeh_onload_callbacks = [];\n",
       "    root._bokeh_is_loading = undefined;\n",
       "  }\n",
       "\n",
       "  const JS_MIME_TYPE = 'application/javascript';\n",
       "  const HTML_MIME_TYPE = 'text/html';\n",
       "  const EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n",
       "  const CLASS_NAME = 'output_bokeh rendered_html';\n",
       "\n",
       "  /**\n",
       "   * Render data to the DOM node\n",
       "   */\n",
       "  function render(props, node) {\n",
       "    const script = document.createElement(\"script\");\n",
       "    node.appendChild(script);\n",
       "  }\n",
       "\n",
       "  /**\n",
       "   * Handle when an output is cleared or removed\n",
       "   */\n",
       "  function handleClearOutput(event, handle) {\n",
       "    const cell = handle.cell;\n",
       "\n",
       "    const id = cell.output_area._bokeh_element_id;\n",
       "    const server_id = cell.output_area._bokeh_server_id;\n",
       "    // Clean up Bokeh references\n",
       "    if (id != null && id in Bokeh.index) {\n",
       "      Bokeh.index[id].model.document.clear();\n",
       "      delete Bokeh.index[id];\n",
       "    }\n",
       "\n",
       "    if (server_id !== undefined) {\n",
       "      // Clean up Bokeh references\n",
       "      const cmd_clean = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n",
       "      cell.notebook.kernel.execute(cmd_clean, {\n",
       "        iopub: {\n",
       "          output: function(msg) {\n",
       "            const id = msg.content.text.trim();\n",
       "            if (id in Bokeh.index) {\n",
       "              Bokeh.index[id].model.document.clear();\n",
       "              delete Bokeh.index[id];\n",
       "            }\n",
       "          }\n",
       "        }\n",
       "      });\n",
       "      // Destroy server and session\n",
       "      const cmd_destroy = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n",
       "      cell.notebook.kernel.execute(cmd_destroy);\n",
       "    }\n",
       "  }\n",
       "\n",
       "  /**\n",
       "   * Handle when a new output is added\n",
       "   */\n",
       "  function handleAddOutput(event, handle) {\n",
       "    const output_area = handle.output_area;\n",
       "    const output = handle.output;\n",
       "\n",
       "    // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n",
       "    if ((output.output_type != \"display_data\") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {\n",
       "      return\n",
       "    }\n",
       "\n",
       "    const toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n",
       "\n",
       "    if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n",
       "      toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n",
       "      // store reference to embed id on output_area\n",
       "      output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n",
       "    }\n",
       "    if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n",
       "      const bk_div = document.createElement(\"div\");\n",
       "      bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n",
       "      const script_attrs = bk_div.children[0].attributes;\n",
       "      for (let i = 0; i < script_attrs.length; i++) {\n",
       "        toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n",
       "        toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent\n",
       "      }\n",
       "      // store reference to server id on output_area\n",
       "      output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n",
       "    }\n",
       "  }\n",
       "\n",
       "  function register_renderer(events, OutputArea) {\n",
       "\n",
       "    function append_mime(data, metadata, element) {\n",
       "      // create a DOM node to render to\n",
       "      const toinsert = this.create_output_subarea(\n",
       "        metadata,\n",
       "        CLASS_NAME,\n",
       "        EXEC_MIME_TYPE\n",
       "      );\n",
       "      this.keyboard_manager.register_events(toinsert);\n",
       "      // Render to node\n",
       "      const props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n",
       "      render(props, toinsert[toinsert.length - 1]);\n",
       "      element.append(toinsert);\n",
       "      return toinsert\n",
       "    }\n",
       "\n",
       "    /* Handle when an output is cleared or removed */\n",
       "    events.on('clear_output.CodeCell', handleClearOutput);\n",
       "    events.on('delete.Cell', handleClearOutput);\n",
       "\n",
       "    /* Handle when a new output is added */\n",
       "    events.on('output_added.OutputArea', handleAddOutput);\n",
       "\n",
       "    /**\n",
       "     * Register the mime type and append_mime function with output_area\n",
       "     */\n",
       "    OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n",
       "      /* Is output safe? */\n",
       "      safe: true,\n",
       "      /* Index of renderer in `output_area.display_order` */\n",
       "      index: 0\n",
       "    });\n",
       "  }\n",
       "\n",
       "  // register the mime type if in Jupyter Notebook environment and previously unregistered\n",
       "  if (root.Jupyter !== undefined) {\n",
       "    const events = require('base/js/events');\n",
       "    const OutputArea = require('notebook/js/outputarea').OutputArea;\n",
       "\n",
       "    if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n",
       "      register_renderer(events, OutputArea);\n",
       "    }\n",
       "  }\n",
       "\n",
       "  \n",
       "  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n",
       "    root._bokeh_timeout = Date.now() + 5000;\n",
       "    root._bokeh_failed_load = false;\n",
       "  }\n",
       "\n",
       "  const NB_LOAD_WARNING = {'data': {'text/html':\n",
       "     \"<div style='background-color: #fdd'>\\n\"+\n",
       "     \"<p>\\n\"+\n",
       "     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n",
       "     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n",
       "     \"</p>\\n\"+\n",
       "     \"<ul>\\n\"+\n",
       "     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n",
       "     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n",
       "     \"</ul>\\n\"+\n",
       "     \"<code>\\n\"+\n",
       "     \"from bokeh.resources import INLINE\\n\"+\n",
       "     \"output_notebook(resources=INLINE)\\n\"+\n",
       "     \"</code>\\n\"+\n",
       "     \"</div>\"}};\n",
       "\n",
       "  function display_loaded() {\n",
       "    const el = document.getElementById(\"1945\");\n",
       "    if (el != null) {\n",
       "      el.textContent = \"BokehJS is loading...\";\n",
       "    }\n",
       "    if (root.Bokeh !== undefined) {\n",
       "      if (el != null) {\n",
       "        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n",
       "      }\n",
       "    } else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(display_loaded, 100)\n",
       "    }\n",
       "  }\n",
       "\n",
       "\n",
       "  function run_callbacks() {\n",
       "    try {\n",
       "      root._bokeh_onload_callbacks.forEach(function(callback) {\n",
       "        if (callback != null)\n",
       "          callback();\n",
       "      });\n",
       "    } finally {\n",
       "      delete root._bokeh_onload_callbacks\n",
       "    }\n",
       "    console.debug(\"Bokeh: all callbacks have finished\");\n",
       "  }\n",
       "\n",
       "  function load_libs(css_urls, js_urls, callback) {\n",
       "    if (css_urls == null) css_urls = [];\n",
       "    if (js_urls == null) js_urls = [];\n",
       "\n",
       "    root._bokeh_onload_callbacks.push(callback);\n",
       "    if (root._bokeh_is_loading > 0) {\n",
       "      console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "      return null;\n",
       "    }\n",
       "    if (js_urls == null || js_urls.length === 0) {\n",
       "      run_callbacks();\n",
       "      return null;\n",
       "    }\n",
       "    console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "    root._bokeh_is_loading = css_urls.length + js_urls.length;\n",
       "\n",
       "    function on_load() {\n",
       "      root._bokeh_is_loading--;\n",
       "      if (root._bokeh_is_loading === 0) {\n",
       "        console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n",
       "        run_callbacks()\n",
       "      }\n",
       "    }\n",
       "\n",
       "    function on_error(url) {\n",
       "      console.error(\"failed to load \" + url);\n",
       "    }\n",
       "\n",
       "    for (let i = 0; i < css_urls.length; i++) {\n",
       "      const url = css_urls[i];\n",
       "      const element = document.createElement(\"link\");\n",
       "      element.onload = on_load;\n",
       "      element.onerror = on_error.bind(null, url);\n",
       "      element.rel = \"stylesheet\";\n",
       "      element.type = \"text/css\";\n",
       "      element.href = url;\n",
       "      console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n",
       "      document.body.appendChild(element);\n",
       "    }\n",
       "\n",
       "    for (let i = 0; i < js_urls.length; i++) {\n",
       "      const url = js_urls[i];\n",
       "      const element = document.createElement('script');\n",
       "      element.onload = on_load;\n",
       "      element.onerror = on_error.bind(null, url);\n",
       "      element.async = false;\n",
       "      element.src = url;\n",
       "      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      document.head.appendChild(element);\n",
       "    }\n",
       "  };\n",
       "\n",
       "  function inject_raw_css(css) {\n",
       "    const element = document.createElement(\"style\");\n",
       "    element.appendChild(document.createTextNode(css));\n",
       "    document.body.appendChild(element);\n",
       "  }\n",
       "\n",
       "  \n",
       "  const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-2.4.2.min.js\"];\n",
       "  const css_urls = [];\n",
       "  \n",
       "\n",
       "  const inline_js = [\n",
       "    function(Bokeh) {\n",
       "      Bokeh.set_log_level(\"info\");\n",
       "    },\n",
       "    function(Bokeh) {\n",
       "    \n",
       "    \n",
       "    }\n",
       "  ];\n",
       "\n",
       "  function run_inline_js() {\n",
       "    \n",
       "    if (root.Bokeh !== undefined || force === true) {\n",
       "      \n",
       "    for (let i = 0; i < inline_js.length; i++) {\n",
       "      inline_js[i].call(root, root.Bokeh);\n",
       "    }\n",
       "    if (force === true) {\n",
       "        display_loaded();\n",
       "      }} else if (Date.now() < root._bokeh_timeout) {\n",
       "      setTimeout(run_inline_js, 100);\n",
       "    } else if (!root._bokeh_failed_load) {\n",
       "      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
       "      root._bokeh_failed_load = true;\n",
       "    } else if (force !== true) {\n",
       "      const cell = $(document.getElementById(\"1945\")).parents('.cell').data().cell;\n",
       "      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
       "    }\n",
       "\n",
       "  }\n",
       "\n",
       "  if (root._bokeh_is_loading === 0) {\n",
       "    console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "    run_inline_js();\n",
       "  } else {\n",
       "    load_libs(css_urls, js_urls, function() {\n",
       "      console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "      run_inline_js();\n",
       "    });\n",
       "  }\n",
       "}(window));"
      ],
      "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n  function now() {\n    return new Date();\n  }\n\n  const force = true;\n\n  if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n    root._bokeh_onload_callbacks = [];\n    root._bokeh_is_loading = undefined;\n  }\n\n  \n\n  \n  if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n    root._bokeh_timeout = Date.now() + 5000;\n    root._bokeh_failed_load = false;\n  }\n\n  const NB_LOAD_WARNING = {'data': {'text/html':\n     \"<div style='background-color: #fdd'>\\n\"+\n     \"<p>\\n\"+\n     \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n     \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n     \"</p>\\n\"+\n     \"<ul>\\n\"+\n     \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n     \"<li>use INLINE resources instead, as so:</li>\\n\"+\n     \"</ul>\\n\"+\n     \"<code>\\n\"+\n     \"from bokeh.resources import INLINE\\n\"+\n     \"output_notebook(resources=INLINE)\\n\"+\n     \"</code>\\n\"+\n     \"</div>\"}};\n\n  function display_loaded() {\n    const el = document.getElementById(\"1945\");\n    if (el != null) {\n      el.textContent = \"BokehJS is loading...\";\n    }\n    if (root.Bokeh !== undefined) {\n      if (el != null) {\n        el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n      }\n    } else if (Date.now() < root._bokeh_timeout) {\n      setTimeout(display_loaded, 100)\n    }\n  }\n\n\n  function run_callbacks() {\n    try {\n      root._bokeh_onload_callbacks.forEach(function(callback) {\n        if (callback != null)\n          callback();\n      });\n    } finally {\n      delete root._bokeh_onload_callbacks\n    }\n    console.debug(\"Bokeh: all callbacks have finished\");\n  }\n\n  function load_libs(css_urls, js_urls, callback) {\n    if (css_urls == null) css_urls = [];\n    if (js_urls == null) js_urls = [];\n\n    root._bokeh_onload_callbacks.push(callback);\n    if (root._bokeh_is_loading > 0) {\n      console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n      return null;\n    }\n    if (js_urls == null || js_urls.length === 0) {\n      run_callbacks();\n      return null;\n    }\n    console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n    root._bokeh_is_loading = css_urls.length + js_urls.length;\n\n    function on_load() {\n      root._bokeh_is_loading--;\n      if (root._bokeh_is_loading === 0) {\n        console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n        run_callbacks()\n      }\n    }\n\n    function on_error(url) {\n      console.error(\"failed to load \" + url);\n    }\n\n    for (let i = 0; i < css_urls.length; i++) {\n      const url = css_urls[i];\n      const element = document.createElement(\"link\");\n      element.onload = on_load;\n      element.onerror = on_error.bind(null, url);\n      element.rel = \"stylesheet\";\n      element.type = \"text/css\";\n      element.href = url;\n      console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n      document.body.appendChild(element);\n    }\n\n    for (let i = 0; i < js_urls.length; i++) {\n      const url = js_urls[i];\n      const element = document.createElement('script');\n      element.onload = on_load;\n      element.onerror = on_error.bind(null, url);\n      element.async = false;\n      element.src = url;\n      console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n      document.head.appendChild(element);\n    }\n  };\n\n  function inject_raw_css(css) {\n    const element = document.createElement(\"style\");\n    element.appendChild(document.createTextNode(css));\n    document.body.appendChild(element);\n  }\n\n  \n  const js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.4.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-mathjax-2.4.2.min.js\"];\n  const css_urls = [];\n  \n\n  const inline_js = [\n    function(Bokeh) {\n      Bokeh.set_log_level(\"info\");\n    },\n    function(Bokeh) {\n    \n    \n    }\n  ];\n\n  function run_inline_js() {\n    \n    if (root.Bokeh !== undefined || force === true) {\n      \n    for (let i = 0; i < inline_js.length; i++) {\n      inline_js[i].call(root, root.Bokeh);\n    }\n    if (force === true) {\n        display_loaded();\n      }} else if (Date.now() < root._bokeh_timeout) {\n      setTimeout(run_inline_js, 100);\n    } else if (!root._bokeh_failed_load) {\n      console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n      root._bokeh_failed_load = true;\n    } else if (force !== true) {\n      const cell = $(document.getElementById(\"1945\")).parents('.cell').data().cell;\n      cell.output_area.append_execute_result(NB_LOAD_WARNING)\n    }\n\n  }\n\n  if (root._bokeh_is_loading === 0) {\n    console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n    run_inline_js();\n  } else {\n    load_libs(css_urls, js_urls, function() {\n      console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n      run_inline_js();\n    });\n  }\n}(window));"
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "print(\"Pandas Version : {}\".format(pd.__version__))\n",
    "\n",
    "import bokeh\n",
    "from bokeh.plotting import figure, show, output_file, output_notebook\n",
    "print(\"Pandas Version : {}\".format(bokeh.__version__))\n",
    "\n",
    "output_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "eb888d65-8b8b-4ad9-984b-624cf9872fd5",
   "metadata": {},
   "source": [
    "# 基础画图"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f7f6cf97-6c98-48ae-b9d1-fa0473aa2687",
   "metadata": {},
   "source": [
    "## 折线图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "76380055-2b70-4edc-b692-c0f35d9b1224",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:13:51.010224Z",
     "iopub.status.busy": "2022-10-21T00:13:51.009661Z",
     "iopub.status.idle": "2022-10-21T00:13:51.151444Z",
     "shell.execute_reply": "2022-10-21T00:13:51.150968Z",
     "shell.execute_reply.started": "2022-10-21T00:13:51.010176Z"
    },
    "slideshow": {
     "slide_type": "slide"
    },
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"68db92b9-f792-43be-a3aa-fc5e9c88c913\" data-root-id=\"1946\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"2e2c4f11-9398-4304-b0ef-40e785ff9cea\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"1957\"}],\"center\":[{\"id\":\"1960\"},{\"id\":\"1964\"},{\"id\":\"1995\"}],\"left\":[{\"id\":\"1961\"}],\"renderers\":[{\"id\":\"1983\"}],\"title\":{\"id\":\"1947\"},\"toolbar\":{\"id\":\"1972\"},\"x_range\":{\"id\":\"1949\"},\"x_scale\":{\"id\":\"1953\"},\"y_range\":{\"id\":\"1951\"},\"y_scale\":{\"id\":\"1955\"}},\"id\":\"1946\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Simple line example\"},\"id\":\"1947\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"1992\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"1993\",\"type\":\"Selection\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1980\",\"type\":\"Line\"},{\"attributes\":{\"overlay\":{\"id\":\"1971\"}},\"id\":\"1967\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"1988\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1987\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1951\",\"type\":\"DataRange1d\"},{\"attributes\":{\"label\":{\"value\":\"Temp.\"},\"renderers\":[{\"id\":\"1983\"}]},\"id\":\"1996\",\"type\":\"LegendItem\"},{\"attributes\":{\"axis_label\":\"y\",\"coordinates\":null,\"formatter\":{\"id\":\"1987\"},\"group\":null,\"major_label_policy\":{\"id\":\"1988\"},\"ticker\":{\"id\":\"1962\"}},\"id\":\"1961\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"items\":[{\"id\":\"1996\"}]},\"id\":\"1995\",\"type\":\"Legend\"},{\"attributes\":{},\"id\":\"1970\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"1979\"},\"glyph\":{\"id\":\"1980\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"1982\"},\"nonselection_glyph\":{\"id\":\"1981\"},\"view\":{\"id\":\"1984\"}},\"id\":\"1983\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1982\",\"type\":\"Line\"},{\"attributes\":{\"axis_label\":\"x\",\"coordinates\":null,\"formatter\":{\"id\":\"1990\"},\"group\":null,\"major_label_policy\":{\"id\":\"1991\"},\"ticker\":{\"id\":\"1958\"}},\"id\":\"1957\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1981\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"1955\",\"type\":\"LinearScale\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"1971\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"1966\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"1990\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"1991\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"1969\",\"type\":\"ResetTool\"},{\"attributes\":{\"axis\":{\"id\":\"1961\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"1964\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"1962\",\"type\":\"BasicTicker\"},{\"attributes\":{\"tools\":[{\"id\":\"1965\"},{\"id\":\"1966\"},{\"id\":\"1967\"},{\"id\":\"1968\"},{\"id\":\"1969\"},{\"id\":\"1970\"}]},\"id\":\"1972\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"1949\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis\":{\"id\":\"1957\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"1960\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"1979\"}},\"id\":\"1984\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"1965\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"1958\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"1968\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"1953\",\"type\":\"LinearScale\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[6,7,2,4,5]},\"selected\":{\"id\":\"1993\"},\"selection_policy\":{\"id\":\"1992\"}},\"id\":\"1979\",\"type\":\"ColumnDataSource\"}],\"root_ids\":[\"1946\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"2e2c4f11-9398-4304-b0ef-40e785ff9cea\",\"root_ids\":[\"1946\"],\"roots\":{\"1946\":\"68db92b9-f792-43be-a3aa-fc5e9c88c913\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "1946"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = [1, 2, 3, 4, 5]\n",
    "y = [6, 7, 2, 4, 5]\n",
    "\n",
    "p = figure(title=\"Simple line example\", x_axis_label='x', y_axis_label='y')\n",
    "p.line(x, y, legend_label=\"Temp.\", line_width=2)\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "01e576b7-4628-4986-af15-d00c03a4da9c",
   "metadata": {},
   "source": [
    "## 多条折线图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "939a5386-10ee-4e2d-a677-96574049fa4b",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:14:05.162632Z",
     "iopub.status.busy": "2022-10-21T00:14:05.162021Z",
     "iopub.status.idle": "2022-10-21T00:14:05.274767Z",
     "shell.execute_reply": "2022-10-21T00:14:05.274306Z",
     "shell.execute_reply.started": "2022-10-21T00:14:05.162582Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"24977199-fa52-43ab-bd39-53ff21d5dbfa\" data-root-id=\"2178\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"ebc55761-2a79-4c2b-8bf3-83b2ffab0f60\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"2189\"}],\"center\":[{\"id\":\"2192\"},{\"id\":\"2196\"},{\"id\":\"2227\"}],\"left\":[{\"id\":\"2193\"}],\"renderers\":[{\"id\":\"2215\"},{\"id\":\"2233\"},{\"id\":\"2252\"}],\"title\":{\"id\":\"2179\"},\"toolbar\":{\"id\":\"2204\"},\"x_range\":{\"id\":\"2181\"},\"x_scale\":{\"id\":\"2185\"},\"y_range\":{\"id\":\"2183\"},\"y_scale\":{\"id\":\"2187\"}},\"id\":\"2178\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"2203\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"2223\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2214\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2211\"},\"glyph\":{\"id\":\"2212\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2214\"},\"nonselection_glyph\":{\"id\":\"2213\"},\"view\":{\"id\":\"2216\"}},\"id\":\"2215\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2248\"},\"glyph\":{\"id\":\"2249\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2251\"},\"nonselection_glyph\":{\"id\":\"2250\"},\"view\":{\"id\":\"2253\"}},\"id\":\"2252\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"label\":{\"value\":\"Objects\"},\"renderers\":[{\"id\":\"2252\"}]},\"id\":\"2268\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"2219\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2266\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"2248\"}},\"id\":\"2253\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2265\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2185\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis_label\":\"x\",\"coordinates\":null,\"formatter\":{\"id\":\"2222\"},\"group\":null,\"major_label_policy\":{\"id\":\"2223\"},\"ticker\":{\"id\":\"2190\"}},\"id\":\"2189\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"2245\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2201\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"2198\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2200\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"2224\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2202\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Multiple line example\"},\"id\":\"2179\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"2244\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis_label\":\"y\",\"coordinates\":null,\"formatter\":{\"id\":\"2219\"},\"group\":null,\"major_label_policy\":{\"id\":\"2220\"},\"ticker\":{\"id\":\"2194\"}},\"id\":\"2193\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"2193\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"2196\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"2194\",\"type\":\"BasicTicker\"},{\"attributes\":{\"overlay\":{\"id\":\"2203\"}},\"id\":\"2199\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"source\":{\"id\":\"2211\"}},\"id\":\"2216\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2231\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2232\",\"type\":\"Line\"},{\"attributes\":{\"tools\":[{\"id\":\"2197\"},{\"id\":\"2198\"},{\"id\":\"2199\"},{\"id\":\"2200\"},{\"id\":\"2201\"},{\"id\":\"2202\"}]},\"id\":\"2204\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"items\":[{\"id\":\"2228\"},{\"id\":\"2247\"},{\"id\":\"2268\"}]},\"id\":\"2227\",\"type\":\"Legend\"},{\"attributes\":{},\"id\":\"2197\",\"type\":\"PanTool\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"green\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2251\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2222\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis\":{\"id\":\"2189\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"2192\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"2229\"}},\"id\":\"2234\",\"type\":\"CDSView\"},{\"attributes\":{\"label\":{\"value\":\"Rate\"},\"renderers\":[{\"id\":\"2233\"}]},\"id\":\"2247\",\"type\":\"LegendItem\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"2266\"},\"selection_policy\":{\"id\":\"2265\"}},\"id\":\"2248\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2190\",\"type\":\"BasicTicker\"},{\"attributes\":{\"line_color\":\"green\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2249\",\"type\":\"Line\"},{\"attributes\":{\"line_color\":\"blue\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2212\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2229\"},\"glyph\":{\"id\":\"2230\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2232\"},\"nonselection_glyph\":{\"id\":\"2231\"},\"view\":{\"id\":\"2234\"}},\"id\":\"2233\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2225\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[2,3,4,5,6]},\"selected\":{\"id\":\"2245\"},\"selection_policy\":{\"id\":\"2244\"}},\"id\":\"2229\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2220\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2181\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[6,7,2,4,5]},\"selected\":{\"id\":\"2225\"},\"selection_policy\":{\"id\":\"2224\"}},\"id\":\"2211\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2187\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2213\",\"type\":\"Line\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2230\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2183\",\"type\":\"DataRange1d\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"green\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2250\",\"type\":\"Line\"},{\"attributes\":{\"label\":{\"value\":\"Temp.\"},\"renderers\":[{\"id\":\"2215\"}]},\"id\":\"2228\",\"type\":\"LegendItem\"}],\"root_ids\":[\"2178\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"ebc55761-2a79-4c2b-8bf3-83b2ffab0f60\",\"root_ids\":[\"2178\"],\"roots\":{\"2178\":\"24977199-fa52-43ab-bd39-53ff21d5dbfa\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "2178"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y1 = [6, 7, 2, 4, 5]\n",
    "y2 = [2, 3, 4, 5, 6]\n",
    "y3 = [4, 5, 5, 7, 2]\n",
    "\n",
    "# create a new plot with a title and axis labels\n",
    "p = figure(title=\"Multiple line example\", x_axis_label=\"x\", y_axis_label=\"y\")\n",
    "\n",
    "# add multiple renderers\n",
    "p.line(x, y1, legend_label=\"Temp.\", color=\"blue\", line_width=2)\n",
    "p.line(x, y2, legend_label=\"Rate\", color=\"red\", line_width=2)\n",
    "p.line(x, y3, legend_label=\"Objects\", color=\"green\", line_width=2)\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d832acb1-18e4-418c-bd2a-cd8060e7699a",
   "metadata": {},
   "source": [
    "## 折线图 + 散点图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "14eac253-db37-44d3-9331-84cb51ceb7fb",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:14:51.088845Z",
     "iopub.status.busy": "2022-10-21T00:14:51.088423Z",
     "iopub.status.idle": "2022-10-21T00:14:51.212994Z",
     "shell.execute_reply": "2022-10-21T00:14:51.212539Z",
     "shell.execute_reply.started": "2022-10-21T00:14:51.088798Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"c86442b0-2037-4ec2-8545-6553cfb0c221\" data-root-id=\"2560\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"69f715ef-f74e-4b1c-a8ba-485fee53ed0e\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"2571\"}],\"center\":[{\"id\":\"2574\"},{\"id\":\"2578\"},{\"id\":\"2609\"}],\"left\":[{\"id\":\"2575\"}],\"renderers\":[{\"id\":\"2597\"},{\"id\":\"2615\"},{\"id\":\"2634\"}],\"title\":{\"id\":\"2561\"},\"toolbar\":{\"id\":\"2586\"},\"x_range\":{\"id\":\"2563\"},\"x_scale\":{\"id\":\"2567\"},\"y_range\":{\"id\":\"2565\"},\"y_scale\":{\"id\":\"2569\"}},\"id\":\"2560\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"2585\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"2648\",\"type\":\"Selection\"},{\"attributes\":{\"label\":{\"value\":\"Temp.\"},\"renderers\":[{\"id\":\"2597\"}]},\"id\":\"2610\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"2607\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2627\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2593\"},\"glyph\":{\"id\":\"2594\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2596\"},\"nonselection_glyph\":{\"id\":\"2595\"},\"view\":{\"id\":\"2598\"}},\"id\":\"2597\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"label\":{\"value\":\"Rate\"},\"renderers\":[{\"id\":\"2615\"}]},\"id\":\"2629\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"2626\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2605\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"2601\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2584\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"2647\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2579\",\"type\":\"PanTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2613\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2614\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2576\",\"type\":\"BasicTicker\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2596\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2630\"},\"glyph\":{\"id\":\"2631\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2633\"},\"nonselection_glyph\":{\"id\":\"2632\"},\"view\":{\"id\":\"2635\"}},\"id\":\"2634\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis\":{\"id\":\"2575\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"2578\",\"type\":\"Grid\"},{\"attributes\":{\"axis_label\":\"y\",\"coordinates\":null,\"formatter\":{\"id\":\"2601\"},\"group\":null,\"major_label_policy\":{\"id\":\"2602\"},\"ticker\":{\"id\":\"2576\"}},\"id\":\"2575\",\"type\":\"LinearAxis\"},{\"attributes\":{\"source\":{\"id\":\"2611\"}},\"id\":\"2616\",\"type\":\"CDSView\"},{\"attributes\":{\"tools\":[{\"id\":\"2579\"},{\"id\":\"2580\"},{\"id\":\"2581\"},{\"id\":\"2582\"},{\"id\":\"2583\"},{\"id\":\"2584\"}]},\"id\":\"2586\",\"type\":\"Toolbar\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"2648\"},\"selection_policy\":{\"id\":\"2647\"}},\"id\":\"2630\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2580\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"items\":[{\"id\":\"2610\"},{\"id\":\"2629\"},{\"id\":\"2650\"}]},\"id\":\"2609\",\"type\":\"Legend\"},{\"attributes\":{\"axis_label\":\"x\",\"coordinates\":null,\"formatter\":{\"id\":\"2604\"},\"group\":null,\"major_label_policy\":{\"id\":\"2605\"},\"ticker\":{\"id\":\"2572\"}},\"id\":\"2571\",\"type\":\"LinearAxis\"},{\"attributes\":{\"source\":{\"id\":\"2630\"}},\"id\":\"2635\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"2567\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"2571\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"2574\",\"type\":\"Grid\"},{\"attributes\":{\"fill_color\":{\"value\":\"yellow\"},\"hatch_color\":{\"value\":\"yellow\"},\"line_color\":{\"value\":\"yellow\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2631\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2583\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"2582\",\"type\":\"SaveTool\"},{\"attributes\":{\"overlay\":{\"id\":\"2585\"}},\"id\":\"2581\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"2602\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2611\"},\"glyph\":{\"id\":\"2612\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2614\"},\"nonselection_glyph\":{\"id\":\"2613\"},\"view\":{\"id\":\"2616\"}},\"id\":\"2615\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_color\":\"blue\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2594\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2565\",\"type\":\"DataRange1d\"},{\"attributes\":{\"line_color\":\"red\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2612\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"2593\"}},\"id\":\"2598\",\"type\":\"CDSView\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2595\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[6,7,2,4,5]},\"selected\":{\"id\":\"2607\"},\"selection_policy\":{\"id\":\"2606\"}},\"id\":\"2593\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2604\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"2563\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"yellow\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"yellow\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"yellow\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2633\",\"type\":\"Circle\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[2,3,4,5,6]},\"selected\":{\"id\":\"2627\"},\"selection_policy\":{\"id\":\"2626\"}},\"id\":\"2611\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"yellow\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"yellow\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"yellow\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2632\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2569\",\"type\":\"LinearScale\"},{\"attributes\":{\"label\":{\"value\":\"Objects\"},\"renderers\":[{\"id\":\"2634\"}]},\"id\":\"2650\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"2606\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Multiple glyphs example\"},\"id\":\"2561\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"2572\",\"type\":\"BasicTicker\"}],\"root_ids\":[\"2560\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"69f715ef-f74e-4b1c-a8ba-485fee53ed0e\",\"root_ids\":[\"2560\"],\"roots\":{\"2560\":\"c86442b0-2037-4ec2-8545-6553cfb0c221\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "2560"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y1 = [6, 7, 2, 4, 5]\n",
    "y2 = [2, 3, 4, 5, 6]\n",
    "y3 = [4, 5, 5, 7, 2]\n",
    "\n",
    "# create a new plot with a title and axis labels\n",
    "p = figure(title=\"Multiple glyphs example\", x_axis_label=\"x\", y_axis_label=\"y\")\n",
    "\n",
    "# add multiple renderers\n",
    "p.line(x, y1, legend_label=\"Temp.\", color=\"blue\", line_width=2)\n",
    "p.line(x, y2, legend_label=\"Rate\", color=\"red\", line_width=2)\n",
    "p.circle(x, y3, legend_label=\"Objects\", color=\"yellow\", size=12)\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "04310e25-c3d5-4190-b1ff-393817b9aa7a",
   "metadata": {},
   "source": [
    "## 折线图 + 柱状图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "6e34bcd9-ca7d-4f9b-b96e-2a1b19f43a52",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:16:01.041085Z",
     "iopub.status.busy": "2022-10-21T00:16:01.040681Z",
     "iopub.status.idle": "2022-10-21T00:16:01.186058Z",
     "shell.execute_reply": "2022-10-21T00:16:01.185406Z",
     "shell.execute_reply.started": "2022-10-21T00:16:01.041040Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"8e1ebb3c-e251-4371-a1b0-398dc4bd66dd\" data-root-id=\"2956\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"c7b34757-0455-4674-898d-2a66c6491423\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"2967\"}],\"center\":[{\"id\":\"2970\"},{\"id\":\"2974\"},{\"id\":\"3005\"}],\"left\":[{\"id\":\"2971\"}],\"renderers\":[{\"id\":\"2993\"},{\"id\":\"3011\"},{\"id\":\"3030\"}],\"title\":{\"id\":\"2957\"},\"toolbar\":{\"id\":\"2982\"},\"x_range\":{\"id\":\"2959\"},\"x_scale\":{\"id\":\"2963\"},\"y_range\":{\"id\":\"2961\"},\"y_scale\":{\"id\":\"2965\"}},\"id\":\"2956\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"axis_label\":\"x\",\"coordinates\":null,\"formatter\":{\"id\":\"3000\"},\"group\":null,\"major_label_policy\":{\"id\":\"3001\"},\"ticker\":{\"id\":\"2968\"}},\"id\":\"2967\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2991\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"2976\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"2998\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"3000\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"3003\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"3001\",\"type\":\"AllLabels\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"2981\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"2989\"},\"glyph\":{\"id\":\"2990\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"2992\"},\"nonselection_glyph\":{\"id\":\"2991\"},\"view\":{\"id\":\"2994\"}},\"id\":\"2993\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"3007\"}},\"id\":\"3012\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"3044\"},\"selection_policy\":{\"id\":\"3043\"}},\"id\":\"3026\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"overlay\":{\"id\":\"2981\"}},\"id\":\"2977\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"2971\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"2974\",\"type\":\"Grid\"},{\"attributes\":{\"fill_color\":{\"value\":\"yellow\"},\"hatch_color\":{\"value\":\"yellow\"},\"line_color\":{\"value\":\"yellow\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3027\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"2979\",\"type\":\"ResetTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"hatch_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"top\":{\"field\":\"top\"},\"width\":{\"value\":0.5},\"x\":{\"field\":\"x\"}},\"id\":\"3008\",\"type\":\"VBar\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"red\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"top\":{\"field\":\"top\"},\"width\":{\"value\":0.5},\"x\":{\"field\":\"x\"}},\"id\":\"3009\",\"type\":\"VBar\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2992\",\"type\":\"Line\"},{\"attributes\":{\"label\":{\"value\":\"Temp.\"},\"renderers\":[{\"id\":\"2993\"}]},\"id\":\"3006\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"3022\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2980\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"items\":[{\"id\":\"3006\"},{\"id\":\"3025\"},{\"id\":\"3046\"}]},\"id\":\"3005\",\"type\":\"Legend\"},{\"attributes\":{},\"id\":\"3023\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2963\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2961\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"2972\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"2997\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_color\":\"blue\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"2990\",\"type\":\"Line\"},{\"attributes\":{\"axis\":{\"id\":\"2967\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"2970\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"3044\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"2975\",\"type\":\"PanTool\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[6,7,2,4,5]},\"selected\":{\"id\":\"3003\"},\"selection_policy\":{\"id\":\"3002\"}},\"id\":\"2989\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"2989\"}},\"id\":\"2994\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"red\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"top\":{\"field\":\"top\"},\"width\":{\"value\":0.5},\"x\":{\"field\":\"x\"}},\"id\":\"3010\",\"type\":\"VBar\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3026\"},\"glyph\":{\"id\":\"3027\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3029\"},\"nonselection_glyph\":{\"id\":\"3028\"},\"view\":{\"id\":\"3031\"}},\"id\":\"3030\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2978\",\"type\":\"SaveTool\"},{\"attributes\":{\"source\":{\"id\":\"3026\"}},\"id\":\"3031\",\"type\":\"CDSView\"},{\"attributes\":{\"tools\":[{\"id\":\"2975\"},{\"id\":\"2976\"},{\"id\":\"2977\"},{\"id\":\"2978\"},{\"id\":\"2979\"},{\"id\":\"2980\"}]},\"id\":\"2982\",\"type\":\"Toolbar\"},{\"attributes\":{\"data\":{\"top\":[2,3,4,5,6],\"x\":[1,2,3,4,5]},\"selected\":{\"id\":\"3023\"},\"selection_policy\":{\"id\":\"3022\"}},\"id\":\"3007\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"2968\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"yellow\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"yellow\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"yellow\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3029\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"yellow\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"yellow\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"yellow\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3028\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Multiple glyphs example\"},\"id\":\"2957\",\"type\":\"Title\"},{\"attributes\":{\"label\":{\"value\":\"Objects\"},\"renderers\":[{\"id\":\"3030\"}]},\"id\":\"3046\",\"type\":\"LegendItem\"},{\"attributes\":{\"label\":{\"value\":\"Rate\"},\"renderers\":[{\"id\":\"3011\"}]},\"id\":\"3025\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"3043\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"2965\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"2959\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"3002\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3007\"},\"glyph\":{\"id\":\"3008\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3010\"},\"nonselection_glyph\":{\"id\":\"3009\"},\"view\":{\"id\":\"3012\"}},\"id\":\"3011\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis_label\":\"y\",\"coordinates\":null,\"formatter\":{\"id\":\"2997\"},\"group\":null,\"major_label_policy\":{\"id\":\"2998\"},\"ticker\":{\"id\":\"2972\"}},\"id\":\"2971\",\"type\":\"LinearAxis\"}],\"root_ids\":[\"2956\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"c7b34757-0455-4674-898d-2a66c6491423\",\"root_ids\":[\"2956\"],\"roots\":{\"2956\":\"8e1ebb3c-e251-4371-a1b0-398dc4bd66dd\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "2956"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y1 = [6, 7, 2, 4, 5]\n",
    "y2 = [2, 3, 4, 5, 6]\n",
    "y3 = [4, 5, 5, 7, 2]\n",
    "\n",
    "# create a new plot with a title and axis labels\n",
    "p = figure(title=\"Multiple glyphs example\", x_axis_label=\"x\", y_axis_label=\"y\")\n",
    "\n",
    "# add multiple renderers\n",
    "p.line(x, y1, legend_label=\"Temp.\", color=\"blue\", line_width=2)\n",
    "p.vbar(x=x, top=y2, legend_label=\"Rate\", width=0.5, bottom=0, color=\"red\")\n",
    "p.circle(x, y3, legend_label=\"Objects\", color=\"yellow\", size=12)\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9984d18e-fbcf-471e-a452-2a0d4673ba11",
   "metadata": {},
   "source": [
    "# 修改注释"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "4d44b2b4-9441-4ad3-b065-463f820bec44",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:17:21.665346Z",
     "iopub.status.busy": "2022-10-21T00:17:21.664924Z",
     "iopub.status.idle": "2022-10-21T00:17:21.790628Z",
     "shell.execute_reply": "2022-10-21T00:17:21.789878Z",
     "shell.execute_reply.started": "2022-10-21T00:17:21.665300Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"be88ce71-0a28-427d-a6f6-64d25fea148a\" data-root-id=\"3366\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"4f315fdc-c8b8-4ffa-9906-62a72e68659f\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"3377\"}],\"center\":[{\"id\":\"3380\"},{\"id\":\"3384\"},{\"id\":\"3415\"}],\"left\":[{\"id\":\"3381\"}],\"renderers\":[{\"id\":\"3403\"},{\"id\":\"3421\"}],\"title\":{\"id\":\"3367\"},\"toolbar\":{\"id\":\"3392\"},\"x_range\":{\"id\":\"3369\"},\"x_scale\":{\"id\":\"3373\"},\"y_range\":{\"id\":\"3371\"},\"y_scale\":{\"id\":\"3375\"}},\"id\":\"3366\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"3408\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"3432\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"3433\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"3413\"},\"selection_policy\":{\"id\":\"3412\"}},\"id\":\"3399\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"3411\",\"type\":\"AllLabels\"},{\"attributes\":{\"label\":{\"value\":\"Temp.\"},\"renderers\":[{\"id\":\"3403\"}]},\"id\":\"3416\",\"type\":\"LegendItem\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3402\",\"type\":\"Line\"},{\"attributes\":{\"line_color\":\"blue\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3400\",\"type\":\"Line\"},{\"attributes\":{\"tools\":[{\"id\":\"3385\"},{\"id\":\"3386\"},{\"id\":\"3387\"},{\"id\":\"3388\"},{\"id\":\"3389\"},{\"id\":\"3390\"}]},\"id\":\"3392\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"3389\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"3388\",\"type\":\"SaveTool\"},{\"attributes\":{\"overlay\":{\"id\":\"3391\"}},\"id\":\"3387\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"3385\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"3386\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"3391\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":80},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3418\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"3382\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"3381\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"3384\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"3413\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"3390\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"3410\"},\"group\":null,\"major_label_policy\":{\"id\":\"3411\"},\"ticker\":{\"id\":\"3378\"}},\"id\":\"3377\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"3373\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"3412\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3417\"},\"glyph\":{\"id\":\"3418\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3420\"},\"nonselection_glyph\":{\"id\":\"3419\"},\"view\":{\"id\":\"3422\"}},\"id\":\"3421\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"3399\"}},\"id\":\"3404\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3399\"},\"glyph\":{\"id\":\"3400\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3402\"},\"nonselection_glyph\":{\"id\":\"3401\"},\"view\":{\"id\":\"3404\"}},\"id\":\"3403\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":80},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3420\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"3410\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"3369\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"3371\",\"type\":\"DataRange1d\"},{\"attributes\":{\"background_fill_alpha\":0.2,\"background_fill_color\":\"navy\",\"border_line_alpha\":0.8,\"border_line_color\":\"navy\",\"border_line_width\":3,\"coordinates\":null,\"group\":null,\"items\":[{\"id\":\"3416\"},{\"id\":\"3435\"}],\"label_text_color\":\"navy\",\"label_text_font\":\"times\",\"label_text_font_style\":\"italic\",\"location\":\"top_left\",\"title\":\"Obervations\"},\"id\":\"3415\",\"type\":\"Legend\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3401\",\"type\":\"Line\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[2,3,4,5,6]},\"selected\":{\"id\":\"3433\"},\"selection_policy\":{\"id\":\"3432\"}},\"id\":\"3417\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"3417\"}},\"id\":\"3422\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"3375\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"3407\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Legend example\"},\"id\":\"3367\",\"type\":\"Title\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":80},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3419\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"3407\"},\"group\":null,\"major_label_policy\":{\"id\":\"3408\"},\"ticker\":{\"id\":\"3382\"}},\"id\":\"3381\",\"type\":\"LinearAxis\"},{\"attributes\":{\"label\":{\"value\":\"Objects\"},\"renderers\":[{\"id\":\"3421\"}]},\"id\":\"3435\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"3378\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"3377\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"3380\",\"type\":\"Grid\"}],\"root_ids\":[\"3366\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"4f315fdc-c8b8-4ffa-9906-62a72e68659f\",\"root_ids\":[\"3366\"],\"roots\":{\"3366\":\"be88ce71-0a28-427d-a6f6-64d25fea148a\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "3366"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y1 = [4, 5, 5, 7, 2]\n",
    "y2 = [2, 3, 4, 5, 6]\n",
    "\n",
    "# create a new plot\n",
    "p = figure(title=\"Legend example\")\n",
    "\n",
    "# add circle renderer with legend_label arguments\n",
    "line = p.line(x, y1, legend_label=\"Temp.\", line_color=\"blue\", line_width=2)\n",
    "circle = p.circle(\n",
    "    x,\n",
    "    y2,\n",
    "    legend_label=\"Objects\",\n",
    "    fill_color=\"red\",\n",
    "    fill_alpha=0.5,\n",
    "    line_color=\"blue\",\n",
    "    size=80,\n",
    ")\n",
    "\n",
    "# display legend in top left corner (default is top right corner)\n",
    "p.legend.location = \"top_left\"\n",
    "\n",
    "# add a title to your legend\n",
    "p.legend.title = \"Obervations\"\n",
    "\n",
    "# change appearance of legend text\n",
    "p.legend.label_text_font = \"times\"\n",
    "p.legend.label_text_font_style = \"italic\"\n",
    "p.legend.label_text_color = \"navy\"\n",
    "\n",
    "# change border and background of legend\n",
    "p.legend.border_line_width = 3\n",
    "p.legend.border_line_color = \"navy\"\n",
    "p.legend.border_line_alpha = 0.8\n",
    "p.legend.background_fill_color = \"navy\"\n",
    "p.legend.background_fill_alpha = 0.2\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d54d6fc2-3554-4a9c-98ba-6c1db756415e",
   "metadata": {},
   "source": [
    "## 修改标题"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "359ed0f8-cff5-4f8b-9b63-7c11c6dcdce8",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:17:51.626684Z",
     "iopub.status.busy": "2022-10-21T00:17:51.626384Z",
     "iopub.status.idle": "2022-10-21T00:17:51.718927Z",
     "shell.execute_reply": "2022-10-21T00:17:51.718191Z",
     "shell.execute_reply.started": "2022-10-21T00:17:51.626664Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"f743ff91-1d3d-40f9-a7fe-5214a65d4f78\" data-root-id=\"3729\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"6adc502f-e93b-4b21-8edf-ed49b93d9ed4\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"3740\"}],\"center\":[{\"id\":\"3743\"},{\"id\":\"3747\"},{\"id\":\"3778\"}],\"left\":[{\"id\":\"3744\"}],\"renderers\":[{\"id\":\"3766\"}],\"title\":{\"id\":\"3730\"},\"title_location\":\"left\",\"toolbar\":{\"id\":\"3755\"},\"x_range\":{\"id\":\"3732\"},\"x_scale\":{\"id\":\"3736\"},\"y_range\":{\"id\":\"3734\"},\"y_scale\":{\"id\":\"3738\"}},\"id\":\"3729\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3763\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"3774\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"3748\",\"type\":\"PanTool\"},{\"attributes\":{\"tools\":[{\"id\":\"3748\"},{\"id\":\"3749\"},{\"id\":\"3750\"},{\"id\":\"3751\"},{\"id\":\"3752\"},{\"id\":\"3753\"}]},\"id\":\"3755\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"items\":[{\"id\":\"3779\"}]},\"id\":\"3778\",\"type\":\"Legend\"},{\"attributes\":{},\"id\":\"3741\",\"type\":\"BasicTicker\"},{\"attributes\":{\"label\":{\"value\":\"Temp.\"},\"renderers\":[{\"id\":\"3766\"}]},\"id\":\"3779\",\"type\":\"LegendItem\"},{\"attributes\":{\"axis\":{\"id\":\"3744\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"3747\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"3775\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"3754\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"3734\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"3776\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"3773\"},\"group\":null,\"major_label_policy\":{\"id\":\"3774\"},\"ticker\":{\"id\":\"3741\"}},\"id\":\"3740\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"3736\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"3738\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"3732\",\"type\":\"DataRange1d\"},{\"attributes\":{\"align\":\"right\",\"background_fill_color\":\"darkgrey\",\"coordinates\":null,\"group\":null,\"text\":\"Changing headline text example\",\"text_color\":\"white\",\"text_font_size\":\"25px\"},\"id\":\"3730\",\"type\":\"Title\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"3762\"},\"glyph\":{\"id\":\"3763\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"3765\"},\"nonselection_glyph\":{\"id\":\"3764\"},\"view\":{\"id\":\"3767\"}},\"id\":\"3766\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3764\",\"type\":\"Line\"},{\"attributes\":{\"overlay\":{\"id\":\"3754\"}},\"id\":\"3750\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"3740\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"3743\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"3753\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"3752\",\"type\":\"ResetTool\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[6,7,2,4,5]},\"selected\":{\"id\":\"3776\"},\"selection_policy\":{\"id\":\"3775\"}},\"id\":\"3762\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"3749\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"source\":{\"id\":\"3762\"}},\"id\":\"3767\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"3751\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"3770\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"3765\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"3771\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"3770\"},\"group\":null,\"major_label_policy\":{\"id\":\"3771\"},\"ticker\":{\"id\":\"3745\"}},\"id\":\"3744\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"3745\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"3773\",\"type\":\"BasicTickFormatter\"}],\"root_ids\":[\"3729\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"6adc502f-e93b-4b21-8edf-ed49b93d9ed4\",\"root_ids\":[\"3729\"],\"roots\":{\"3729\":\"f743ff91-1d3d-40f9-a7fe-5214a65d4f78\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "3729"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [6, 7, 2, 4, 5]\n",
    "\n",
    "# create new plot\n",
    "p = figure(title=\"Headline example\")\n",
    "\n",
    "# add line renderer with a legend\n",
    "p.line(x, y, legend_label=\"Temp.\", line_width=2)\n",
    "\n",
    "# change headline location to the left\n",
    "p.title_location = \"left\"\n",
    "\n",
    "# change headline text\n",
    "p.title.text = \"Changing headline text example\"\n",
    "\n",
    "# style the headline\n",
    "p.title.text_font_size = \"25px\"\n",
    "p.title.align = \"right\"\n",
    "p.title.background_fill_color = \"darkgrey\"\n",
    "p.title.text_color = \"white\"\n",
    "\n",
    "# show the results\n",
    "show(p)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "71991cb1-5d61-4332-9f77-c3ab66d9b335",
   "metadata": {},
   "source": [
    "## 修改图片大小"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "8e2efa01-00b4-4507-94b9-0be322ba5ec3",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:18:04.810003Z",
     "iopub.status.busy": "2022-10-21T00:18:04.809578Z",
     "iopub.status.idle": "2022-10-21T00:18:04.916712Z",
     "shell.execute_reply": "2022-10-21T00:18:04.916243Z",
     "shell.execute_reply.started": "2022-10-21T00:18:04.809957Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"645f0fb3-5196-4da8-a960-f33a7f3e3d7f\" data-root-id=\"4045\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"106bb97b-761e-4e48-9986-6be79c665f8c\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"4056\"}],\"center\":[{\"id\":\"4059\"},{\"id\":\"4063\"}],\"height\":250,\"left\":[{\"id\":\"4060\"}],\"renderers\":[{\"id\":\"4082\"}],\"title\":{\"id\":\"4046\"},\"toolbar\":{\"id\":\"4071\"},\"width\":350,\"x_range\":{\"id\":\"4048\"},\"x_scale\":{\"id\":\"4052\"},\"y_range\":{\"id\":\"4050\"},\"y_scale\":{\"id\":\"4054\"}},\"id\":\"4045\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Plot sizing example\"},\"id\":\"4046\",\"type\":\"Title\"},{\"attributes\":{\"axis_label\":\"x\",\"coordinates\":null,\"formatter\":{\"id\":\"4163\"},\"group\":null,\"major_label_policy\":{\"id\":\"4164\"},\"ticker\":{\"id\":\"4057\"}},\"id\":\"4056\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis_label\":\"y\",\"coordinates\":null,\"formatter\":{\"id\":\"4160\"},\"group\":null,\"major_label_policy\":{\"id\":\"4161\"},\"ticker\":{\"id\":\"4061\"}},\"id\":\"4060\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"4052\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4065\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"4061\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4054\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4068\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"4067\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"4057\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"4056\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"4059\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"4160\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4161\",\"type\":\"AllLabels\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"4070\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4081\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"4163\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4078\"},\"glyph\":{\"id\":\"4079\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4081\"},\"nonselection_glyph\":{\"id\":\"4080\"},\"view\":{\"id\":\"4083\"}},\"id\":\"4082\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4050\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4079\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"4164\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"4048\",\"type\":\"DataRange1d\"},{\"attributes\":{\"tools\":[{\"id\":\"4064\"},{\"id\":\"4065\"},{\"id\":\"4066\"},{\"id\":\"4067\"},{\"id\":\"4068\"},{\"id\":\"4069\"}]},\"id\":\"4071\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"4069\",\"type\":\"HelpTool\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"4166\"},\"selection_policy\":{\"id\":\"4165\"}},\"id\":\"4078\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4080\",\"type\":\"Circle\"},{\"attributes\":{\"axis\":{\"id\":\"4060\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"4063\",\"type\":\"Grid\"},{\"attributes\":{\"overlay\":{\"id\":\"4070\"}},\"id\":\"4066\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"4064\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"4165\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4166\",\"type\":\"Selection\"},{\"attributes\":{\"source\":{\"id\":\"4078\"}},\"id\":\"4083\",\"type\":\"CDSView\"}],\"root_ids\":[\"4045\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"106bb97b-761e-4e48-9986-6be79c665f8c\",\"root_ids\":[\"4045\"],\"roots\":{\"4045\":\"645f0fb3-5196-4da8-a960-f33a7f3e3d7f\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "4045"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [4, 5, 5, 7, 2]\n",
    "\n",
    "# create a new plot with a specific size\n",
    "p = figure(\n",
    "    title=\"Plot sizing example\",\n",
    "    width=350,\n",
    "    height=250,\n",
    "    x_axis_label=\"x\",\n",
    "    y_axis_label=\"y\",\n",
    ")\n",
    "\n",
    "# add circle renderer\n",
    "circle = p.circle(x, y, fill_color=\"red\", size=15)\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "b3bedcb4-d1ed-4ad4-8a3d-a616a01796a4",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:18:20.333921Z",
     "iopub.status.busy": "2022-10-21T00:18:20.333360Z",
     "iopub.status.idle": "2022-10-21T00:18:20.444093Z",
     "shell.execute_reply": "2022-10-21T00:18:20.443472Z",
     "shell.execute_reply.started": "2022-10-21T00:18:20.333892Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"0ddb5fa1-ff72-4d06-bf16-2125b671c26d\" data-root-id=\"4359\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"c800592a-539e-4832-a241-ef5c295724c3\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"4370\"}],\"center\":[{\"id\":\"4373\"},{\"id\":\"4377\"}],\"height\":150,\"left\":[{\"id\":\"4374\"}],\"renderers\":[{\"id\":\"4396\"}],\"title\":{\"id\":\"4360\"},\"toolbar\":{\"id\":\"4385\"},\"width\":450,\"x_range\":{\"id\":\"4362\"},\"x_scale\":{\"id\":\"4366\"},\"y_range\":{\"id\":\"4364\"},\"y_scale\":{\"id\":\"4368\"}},\"id\":\"4359\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"source\":{\"id\":\"4392\"}},\"id\":\"4397\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4484\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4383\",\"type\":\"HelpTool\"},{\"attributes\":{\"axis_label\":\"x\",\"coordinates\":null,\"formatter\":{\"id\":\"4487\"},\"group\":null,\"major_label_policy\":{\"id\":\"4488\"},\"ticker\":{\"id\":\"4371\"}},\"id\":\"4370\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"4379\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"4485\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4393\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"4487\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4375\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4394\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"4488\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"4490\"},\"selection_policy\":{\"id\":\"4489\"}},\"id\":\"4392\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"4384\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"axis\":{\"id\":\"4370\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"4373\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"4366\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"4374\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"4377\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"4378\",\"type\":\"PanTool\"},{\"attributes\":{\"axis_label\":\"y\",\"coordinates\":null,\"formatter\":{\"id\":\"4484\"},\"group\":null,\"major_label_policy\":{\"id\":\"4485\"},\"ticker\":{\"id\":\"4375\"}},\"id\":\"4374\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4395\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"4362\",\"type\":\"DataRange1d\"},{\"attributes\":{\"tools\":[{\"id\":\"4378\"},{\"id\":\"4379\"},{\"id\":\"4380\"},{\"id\":\"4381\"},{\"id\":\"4382\"},{\"id\":\"4383\"}]},\"id\":\"4385\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"4489\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"4368\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Plot resizing example\"},\"id\":\"4360\",\"type\":\"Title\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4392\"},\"glyph\":{\"id\":\"4393\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4395\"},\"nonselection_glyph\":{\"id\":\"4394\"},\"view\":{\"id\":\"4397\"}},\"id\":\"4396\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4371\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4490\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4364\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"4381\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"4382\",\"type\":\"ResetTool\"},{\"attributes\":{\"overlay\":{\"id\":\"4384\"}},\"id\":\"4380\",\"type\":\"BoxZoomTool\"}],\"root_ids\":[\"4359\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"c800592a-539e-4832-a241-ef5c295724c3\",\"root_ids\":[\"4359\"],\"roots\":{\"4359\":\"0ddb5fa1-ff72-4d06-bf16-2125b671c26d\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "4359"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [4, 5, 5, 7, 2]\n",
    "\n",
    "# create a new plot with a specific size\n",
    "p = figure(\n",
    "    title=\"Plot resizing example\",\n",
    "    width=350,\n",
    "    height=250,\n",
    "    x_axis_label=\"x\",\n",
    "    y_axis_label=\"y\",\n",
    ")\n",
    "\n",
    "# change plot size\n",
    "p.width = 450\n",
    "p.height = 150\n",
    "\n",
    "# add circle renderer\n",
    "circle = p.circle(x, y, fill_color=\"red\", size=15)\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "ed47dd83-7fd3-4652-ba10-414b552772ec",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:22:54.400707Z",
     "iopub.status.busy": "2022-10-21T00:22:54.400295Z",
     "iopub.status.idle": "2022-10-21T00:22:54.514083Z",
     "shell.execute_reply": "2022-10-21T00:22:54.513614Z",
     "shell.execute_reply.started": "2022-10-21T00:22:54.400662Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"1819a675-f249-4af7-bbb5-28ac9e733405\" data-root-id=\"4683\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"945ca36a-7be3-4737-bd93-56add89aeb90\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"4694\"}],\"center\":[{\"id\":\"4697\"},{\"id\":\"4701\"}],\"height\":250,\"left\":[{\"id\":\"4698\"}],\"renderers\":[{\"id\":\"4720\"}],\"sizing_mode\":\"stretch_width\",\"title\":{\"id\":\"4684\"},\"toolbar\":{\"id\":\"4709\"},\"x_range\":{\"id\":\"4686\"},\"x_scale\":{\"id\":\"4690\"},\"y_range\":{\"id\":\"4688\"},\"y_scale\":{\"id\":\"4692\"}},\"id\":\"4683\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"tools\":[{\"id\":\"4702\"},{\"id\":\"4703\"},{\"id\":\"4704\"},{\"id\":\"4705\"},{\"id\":\"4706\"},{\"id\":\"4707\"}]},\"id\":\"4709\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"4695\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4821\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4718\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"4822\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"4716\"}},\"id\":\"4721\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"4819\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"4703\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"4692\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"4823\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"4716\"},\"glyph\":{\"id\":\"4717\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"4719\"},\"nonselection_glyph\":{\"id\":\"4718\"},\"view\":{\"id\":\"4721\"}},\"id\":\"4720\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"4824\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"4686\",\"type\":\"DataRange1d\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"4708\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"4706\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"4705\",\"type\":\"SaveTool\"},{\"attributes\":{\"overlay\":{\"id\":\"4708\"}},\"id\":\"4704\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"4694\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"4697\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"4688\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis_label\":\"x\",\"coordinates\":null,\"formatter\":{\"id\":\"4821\"},\"group\":null,\"major_label_policy\":{\"id\":\"4822\"},\"ticker\":{\"id\":\"4695\"}},\"id\":\"4694\",\"type\":\"LinearAxis\"},{\"attributes\":{\"axis\":{\"id\":\"4698\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"4701\",\"type\":\"Grid\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"4824\"},\"selection_policy\":{\"id\":\"4823\"}},\"id\":\"4716\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4719\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"4702\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"4690\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis_label\":\"y\",\"coordinates\":null,\"formatter\":{\"id\":\"4818\"},\"group\":null,\"major_label_policy\":{\"id\":\"4819\"},\"ticker\":{\"id\":\"4699\"}},\"id\":\"4698\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Plot responsive sizing example\"},\"id\":\"4684\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"4699\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"4818\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"4707\",\"type\":\"HelpTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"4717\",\"type\":\"Circle\"}],\"root_ids\":[\"4683\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"945ca36a-7be3-4737-bd93-56add89aeb90\",\"root_ids\":[\"4683\"],\"roots\":{\"4683\":\"1819a675-f249-4af7-bbb5-28ac9e733405\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "4683"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [4, 5, 5, 7, 2]\n",
    "\n",
    "# create a new plot with responsive width\n",
    "p = figure(\n",
    "    title=\"Plot responsive sizing example\",\n",
    "    sizing_mode=\"stretch_width\",\n",
    "    height=250,\n",
    "    x_axis_label=\"x\",\n",
    "    y_axis_label=\"y\",\n",
    ")\n",
    "\n",
    "# add circle renderer\n",
    "circle = p.circle(x, y, fill_color=\"red\", size=15)\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d72ec293-49c1-429f-93cc-9f2e95da5d99",
   "metadata": {},
   "source": [
    "## 自定义坐标轴"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "96d26e03-8ca1-40ca-bce8-7835a888efbc",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:23:07.776738Z",
     "iopub.status.busy": "2022-10-21T00:23:07.776272Z",
     "iopub.status.idle": "2022-10-21T00:23:07.891351Z",
     "shell.execute_reply": "2022-10-21T00:23:07.890890Z",
     "shell.execute_reply.started": "2022-10-21T00:23:07.776694Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"1c0b2445-93dd-4126-8afc-278de6a72c02\" data-root-id=\"5017\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"c2e6aff4-e8cf-44a8-9ec7-459ecaed6583\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"5028\"}],\"center\":[{\"id\":\"5031\"},{\"id\":\"5035\"}],\"height\":350,\"left\":[{\"id\":\"5032\"}],\"max_width\":500,\"renderers\":[{\"id\":\"5054\"}],\"sizing_mode\":\"stretch_width\",\"title\":{\"id\":\"5018\"},\"toolbar\":{\"id\":\"5043\"},\"x_range\":{\"id\":\"5020\"},\"x_scale\":{\"id\":\"5024\"},\"y_range\":{\"id\":\"5022\"},\"y_scale\":{\"id\":\"5026\"}},\"id\":\"5017\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"5039\",\"type\":\"SaveTool\"},{\"attributes\":{\"overlay\":{\"id\":\"5042\"}},\"id\":\"5038\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"5036\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"5037\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"5041\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"5033\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"5032\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"5035\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"5050\"},\"glyph\":{\"id\":\"5051\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"5053\"},\"nonselection_glyph\":{\"id\":\"5052\"},\"view\":{\"id\":\"5055\"}},\"id\":\"5054\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"5050\"}},\"id\":\"5055\",\"type\":\"CDSView\"},{\"attributes\":{\"axis\":{\"id\":\"5028\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"5031\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5053\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"5026\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"5029\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"5022\",\"type\":\"DataRange1d\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"5042\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"5040\",\"type\":\"ResetTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Customized axes example\"},\"id\":\"5018\",\"type\":\"Title\"},{\"attributes\":{\"axis_label\":\"Pressure\",\"coordinates\":null,\"formatter\":{\"id\":\"5162\"},\"group\":null,\"major_label_orientation\":\"vertical\",\"major_label_policy\":{\"id\":\"5163\"},\"major_label_text_color\":\"orange\",\"minor_tick_in\":-3,\"minor_tick_out\":6,\"ticker\":{\"id\":\"5033\"}},\"id\":\"5032\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"5162\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis_label\":\"Temp\",\"axis_line_color\":\"red\",\"axis_line_width\":3,\"coordinates\":null,\"formatter\":{\"id\":\"5165\"},\"group\":null,\"major_label_policy\":{\"id\":\"5166\"},\"minor_tick_in\":-3,\"minor_tick_out\":6,\"ticker\":{\"id\":\"5029\"}},\"id\":\"5028\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"5024\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"5163\",\"type\":\"AllLabels\"},{\"attributes\":{\"tools\":[{\"id\":\"5036\"},{\"id\":\"5037\"},{\"id\":\"5038\"},{\"id\":\"5039\"},{\"id\":\"5040\"},{\"id\":\"5041\"}]},\"id\":\"5043\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"5168\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"5165\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"5166\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"5168\"},\"selection_policy\":{\"id\":\"5167\"}},\"id\":\"5050\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5052\",\"type\":\"Circle\"},{\"attributes\":{\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5051\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"5167\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"5020\",\"type\":\"DataRange1d\"}],\"root_ids\":[\"5017\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"c2e6aff4-e8cf-44a8-9ec7-459ecaed6583\",\"root_ids\":[\"5017\"],\"roots\":{\"5017\":\"1c0b2445-93dd-4126-8afc-278de6a72c02\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "5017"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [4, 5, 5, 7, 2]\n",
    "\n",
    "# create a plot\n",
    "p = figure(\n",
    "    title=\"Customized axes example\",\n",
    "    sizing_mode=\"stretch_width\",\n",
    "    max_width=500,\n",
    "    height=350,\n",
    ")\n",
    "\n",
    "# add a renderer\n",
    "p.circle(x, y, size=10)\n",
    "\n",
    "# change some things about the x-axis\n",
    "p.xaxis.axis_label = \"Temp\"\n",
    "p.xaxis.axis_line_width = 3\n",
    "p.xaxis.axis_line_color = \"red\"\n",
    "\n",
    "# change some things about the y-axis\n",
    "p.yaxis.axis_label = \"Pressure\"\n",
    "p.yaxis.major_label_text_color = \"orange\"\n",
    "p.yaxis.major_label_orientation = \"vertical\"\n",
    "\n",
    "# change things on all axes\n",
    "p.axis.minor_tick_in = -3\n",
    "p.axis.minor_tick_out = 6\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4100b095-f514-4976-b222-60b1a832bc72",
   "metadata": {},
   "source": [
    "## 坐标轴范围"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "01edac94-d638-4da6-b178-b36765c28514",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:23:19.665793Z",
     "iopub.status.busy": "2022-10-21T00:23:19.665181Z",
     "iopub.status.idle": "2022-10-21T00:23:19.784610Z",
     "shell.execute_reply": "2022-10-21T00:23:19.784137Z",
     "shell.execute_reply.started": "2022-10-21T00:23:19.665743Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"8515cc52-6d39-4bcf-849d-944eead9e7ff\" data-root-id=\"5361\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"e01cbf0e-5805-4c06-b609-4fb2e9961a9a\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"5372\"}],\"center\":[{\"id\":\"5375\"},{\"id\":\"5379\"}],\"height\":250,\"left\":[{\"id\":\"5376\"}],\"max_width\":500,\"renderers\":[{\"id\":\"5398\"}],\"sizing_mode\":\"stretch_width\",\"title\":{\"id\":\"5362\"},\"toolbar\":{\"id\":\"5387\"},\"x_range\":{\"id\":\"5364\"},\"x_scale\":{\"id\":\"5368\"},\"y_range\":{\"id\":\"5366\"},\"y_scale\":{\"id\":\"5370\"}},\"id\":\"5361\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"5385\",\"type\":\"HelpTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"5386\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"5517\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5397\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"5394\"},\"glyph\":{\"id\":\"5395\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"5397\"},\"nonselection_glyph\":{\"id\":\"5396\"},\"view\":{\"id\":\"5399\"}},\"id\":\"5398\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"5519\"},\"group\":null,\"major_label_policy\":{\"id\":\"5520\"},\"ticker\":{\"id\":\"5373\"}},\"id\":\"5372\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"5522\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"5519\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"5370\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"5383\",\"type\":\"SaveTool\"},{\"attributes\":{\"overlay\":{\"id\":\"5386\"}},\"id\":\"5382\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"5384\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"5380\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"5520\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"5521\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"5364\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis\":{\"id\":\"5372\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"5375\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"5516\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"5373\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"5376\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"5379\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5396\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Axis range example\"},\"id\":\"5362\",\"type\":\"Title\"},{\"attributes\":{\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5395\",\"type\":\"Circle\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"5522\"},\"selection_policy\":{\"id\":\"5521\"}},\"id\":\"5394\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"tools\":[{\"id\":\"5380\"},{\"id\":\"5381\"},{\"id\":\"5382\"},{\"id\":\"5383\"},{\"id\":\"5384\"},{\"id\":\"5385\"}]},\"id\":\"5387\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"5368\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"5377\",\"type\":\"BasicTicker\"},{\"attributes\":{\"source\":{\"id\":\"5394\"}},\"id\":\"5399\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"5381\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"5516\"},\"group\":null,\"major_label_policy\":{\"id\":\"5517\"},\"ticker\":{\"id\":\"5377\"}},\"id\":\"5376\",\"type\":\"LinearAxis\"},{\"attributes\":{\"end\":25},\"id\":\"5366\",\"type\":\"Range1d\"}],\"root_ids\":[\"5361\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"e01cbf0e-5805-4c06-b609-4fb2e9961a9a\",\"root_ids\":[\"5361\"],\"roots\":{\"5361\":\"8515cc52-6d39-4bcf-849d-944eead9e7ff\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "5361"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [4, 5, 5, 7, 2]\n",
    "\n",
    "# create a new plot with responsive width\n",
    "p = figure(\n",
    "    y_range=(0, 25),\n",
    "    title=\"Axis range example\",\n",
    "    sizing_mode=\"stretch_width\",\n",
    "    max_width=500,\n",
    "    height=250,\n",
    ")\n",
    "\n",
    "# add circle renderer with additional arguments\n",
    "circle = p.circle(x, y, size=8)\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cac2252d-1c50-4c4c-a6b1-02d0102c2912",
   "metadata": {},
   "source": [
    "## 坐标轴刻度"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "3fdea061-e5e2-48dc-afdf-7ee295b6fcee",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:24:03.980393Z",
     "iopub.status.busy": "2022-10-21T00:24:03.979796Z",
     "iopub.status.idle": "2022-10-21T00:24:04.113798Z",
     "shell.execute_reply": "2022-10-21T00:24:04.113322Z",
     "shell.execute_reply.started": "2022-10-21T00:24:03.980341Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"2c57ffbb-0b78-455c-8f8b-d656f3cdb38b\" data-root-id=\"5715\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"65329efd-4d61-4333-8a67-c7c03980c72e\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"5726\"}],\"center\":[{\"id\":\"5729\"},{\"id\":\"5733\"}],\"height\":250,\"left\":[{\"id\":\"5730\"}],\"max_width\":500,\"renderers\":[{\"id\":\"5754\"},{\"id\":\"5760\"}],\"sizing_mode\":\"stretch_width\",\"title\":{\"id\":\"5716\"},\"toolbar\":{\"id\":\"5741\"},\"x_range\":{\"id\":\"5718\"},\"x_scale\":{\"id\":\"5722\"},\"y_range\":{\"id\":\"5720\"},\"y_scale\":{\"id\":\"5724\"}},\"id\":\"5715\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"overlay\":{\"id\":\"5740\"}},\"id\":\"5736\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"5726\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"5729\",\"type\":\"Grid\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"5740\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"5734\",\"type\":\"PanTool\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"5748\"},\"group\":null,\"major_label_policy\":{\"id\":\"5888\"},\"ticker\":{\"id\":\"5731\"}},\"id\":\"5730\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"5722\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"5756\"}},\"id\":\"5761\",\"type\":\"CDSView\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5753\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"5894\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"5727\",\"type\":\"BasicTicker\"},{\"attributes\":{\"format\":\"$0.00\"},\"id\":\"5748\",\"type\":\"NumeralTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"5756\"},\"glyph\":{\"id\":\"5757\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"5759\"},\"nonselection_glyph\":{\"id\":\"5758\"},\"view\":{\"id\":\"5761\"}},\"id\":\"5760\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"5718\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"5893\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"5895\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"5731\",\"type\":\"BasicTicker\"},{\"attributes\":{\"tools\":[{\"id\":\"5734\"},{\"id\":\"5735\"},{\"id\":\"5736\"},{\"id\":\"5737\"},{\"id\":\"5738\"},{\"id\":\"5739\"}]},\"id\":\"5741\",\"type\":\"Toolbar\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"5893\"},\"selection_policy\":{\"id\":\"5892\"}},\"id\":\"5750\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"5737\",\"type\":\"SaveTool\"},{\"attributes\":{\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5757\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"5892\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5752\",\"type\":\"Circle\"},{\"attributes\":{\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5751\",\"type\":\"Circle\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5758\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5759\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Tick formatter example\"},\"id\":\"5716\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"5724\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"5888\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"5895\"},\"selection_policy\":{\"id\":\"5894\"}},\"id\":\"5756\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"5720\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"5739\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"5750\"},\"glyph\":{\"id\":\"5751\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"5753\"},\"nonselection_glyph\":{\"id\":\"5752\"},\"view\":{\"id\":\"5755\"}},\"id\":\"5754\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"5735\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"5890\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis\":{\"id\":\"5730\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"5733\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"5890\"},\"group\":null,\"major_label_policy\":{\"id\":\"5891\"},\"ticker\":{\"id\":\"5727\"}},\"id\":\"5726\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"5738\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"5750\"}},\"id\":\"5755\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"5891\",\"type\":\"AllLabels\"}],\"root_ids\":[\"5715\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"65329efd-4d61-4333-8a67-c7c03980c72e\",\"root_ids\":[\"5715\"],\"roots\":{\"5715\":\"2c57ffbb-0b78-455c-8f8b-d656f3cdb38b\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "5715"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from bokeh.models import NumeralTickFormatter\n",
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [4, 5, 5, 7, 2]\n",
    "\n",
    "# create new plot\n",
    "p = figure(\n",
    "    title=\"Tick formatter example\",\n",
    "    sizing_mode=\"stretch_width\",\n",
    "    max_width=500,\n",
    "    height=250,\n",
    ")\n",
    "\n",
    "# format axes ticks\n",
    "p.yaxis[0].formatter = NumeralTickFormatter(format=\"$0.00\")\n",
    "\n",
    "# add renderers\n",
    "p.circle(x, y, size=8)\n",
    "p.line(x, y, color=\"navy\", line_width=1)\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "bf7602ab-ab55-4919-9b85-ed819b4e04a1",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:24:20.882052Z",
     "iopub.status.busy": "2022-10-21T00:24:20.881611Z",
     "iopub.status.idle": "2022-10-21T00:24:21.110705Z",
     "shell.execute_reply": "2022-10-21T00:24:21.109816Z",
     "shell.execute_reply.started": "2022-10-21T00:24:20.882005Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"2cbaf9db-1560-44f9-91bf-d9166258ef23\" data-root-id=\"6107\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"6f57c0d1-0b76-4917-b02a-84c9d27e9faf\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"6118\"}],\"center\":[{\"id\":\"6121\"},{\"id\":\"6125\"},{\"id\":\"6156\"}],\"height\":300,\"left\":[{\"id\":\"6122\"}],\"max_width\":500,\"renderers\":[{\"id\":\"6144\"},{\"id\":\"6162\"},{\"id\":\"6180\"},{\"id\":\"6201\"},{\"id\":\"6224\"},{\"id\":\"6248\"}],\"sizing_mode\":\"stretch_width\",\"title\":{\"id\":\"6108\"},\"toolbar\":{\"id\":\"6133\"},\"x_range\":{\"id\":\"6110\"},\"x_scale\":{\"id\":\"6114\"},\"y_range\":{\"id\":\"6112\"},\"y_scale\":{\"id\":\"6116\"}},\"id\":\"6107\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"6220\"},\"glyph\":{\"id\":\"6221\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"6223\"},\"nonselection_glyph\":{\"id\":\"6222\"},\"view\":{\"id\":\"6225\"}},\"id\":\"6224\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6223\",\"type\":\"Circle\"},{\"attributes\":{\"data\":{\"x\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0],\"y\":[1.023292992280754,1.7782794100389228,10.0,177.82794100389228,10000.0,1778279.410038923,1000000000.0]},\"selected\":{\"id\":\"6268\"},\"selection_policy\":{\"id\":\"6267\"}},\"id\":\"6244\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"6220\"}},\"id\":\"6225\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"6242\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"red\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6222\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"6174\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"6241\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6141\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"6130\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"6129\",\"type\":\"SaveTool\"},{\"attributes\":{\"overlay\":{\"id\":\"6132\"}},\"id\":\"6128\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"6126\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"6127\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6142\",\"type\":\"Line\"},{\"attributes\":{\"num_minor_ticks\":10},\"id\":\"6123\",\"type\":\"LogTicker\"},{\"attributes\":{\"axis\":{\"id\":\"6122\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"6125\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"6131\",\"type\":\"HelpTool\"},{\"attributes\":{\"label\":{\"value\":\"y=x^2\"},\"renderers\":[{\"id\":\"6180\"}]},\"id\":\"6196\",\"type\":\"LegendItem\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"6197\"},\"glyph\":{\"id\":\"6198\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"6200\"},\"nonselection_glyph\":{\"id\":\"6199\"},\"view\":{\"id\":\"6202\"}},\"id\":\"6201\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"6244\"}},\"id\":\"6249\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"6244\"},\"glyph\":{\"id\":\"6245\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"6247\"},\"nonselection_glyph\":{\"id\":\"6246\"},\"view\":{\"id\":\"6249\"}},\"id\":\"6248\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"6173\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"label\":{\"value\":\"y=10^x^2\"},\"renderers\":[{\"id\":\"6248\"}]},\"id\":\"6270\",\"type\":\"LegendItem\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"orange\",\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6247\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"orange\",\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6246\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"6267\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"6268\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"white\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6160\",\"type\":\"Circle\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6177\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"6110\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6159\",\"type\":\"Circle\"},{\"attributes\":{\"end\":100000000000,\"start\":0.001},\"id\":\"6112\",\"type\":\"Range1d\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"6140\"},\"glyph\":{\"id\":\"6141\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"6143\"},\"nonselection_glyph\":{\"id\":\"6142\"},\"view\":{\"id\":\"6145\"}},\"id\":\"6144\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0],\"y\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0]},\"selected\":{\"id\":\"6174\"},\"selection_policy\":{\"id\":\"6173\"}},\"id\":\"6158\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"6114\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"6116\",\"type\":\"LogScale\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Logarithmic axis example\"},\"id\":\"6108\",\"type\":\"Title\"},{\"attributes\":{\"axis_label\":\"sections\",\"coordinates\":null,\"formatter\":{\"id\":\"6151\"},\"group\":null,\"major_label_policy\":{\"id\":\"6152\"},\"ticker\":{\"id\":\"6119\"}},\"id\":\"6118\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"white\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6161\",\"type\":\"Circle\"},{\"attributes\":{\"axis_label\":\"particles\",\"coordinates\":null,\"formatter\":{\"id\":\"6148\"},\"group\":null,\"major_label_policy\":{\"id\":\"6149\"},\"ticker\":{\"id\":\"6123\"}},\"id\":\"6122\",\"type\":\"LogAxis\"},{\"attributes\":{\"tools\":[{\"id\":\"6126\"},{\"id\":\"6127\"},{\"id\":\"6128\"},{\"id\":\"6129\"},{\"id\":\"6130\"},{\"id\":\"6131\"}]},\"id\":\"6133\",\"type\":\"Toolbar\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6179\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"6158\"},\"glyph\":{\"id\":\"6159\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"6161\"},\"nonselection_glyph\":{\"id\":\"6160\"},\"view\":{\"id\":\"6163\"}},\"id\":\"6162\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6221\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"6119\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"6118\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"6121\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"6158\"}},\"id\":\"6163\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0],\"y\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0]},\"selected\":{\"id\":\"6154\"},\"selection_policy\":{\"id\":\"6153\"}},\"id\":\"6140\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"x\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0],\"y\":[1.2589254117941673,3.1622776601683795,10.0,31.622776601683793,100.0,316.22776601683796,1000.0]},\"selected\":{\"id\":\"6217\"},\"selection_policy\":{\"id\":\"6216\"}},\"id\":\"6197\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"6176\"},\"glyph\":{\"id\":\"6177\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"6179\"},\"nonselection_glyph\":{\"id\":\"6178\"},\"view\":{\"id\":\"6181\"}},\"id\":\"6180\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"6132\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"source\":{\"id\":\"6176\"}},\"id\":\"6181\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0],\"y\":[0.010000000000000002,0.25,1.0,2.25,4.0,6.25,9.0]},\"selected\":{\"id\":\"6194\"},\"selection_policy\":{\"id\":\"6193\"}},\"id\":\"6176\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"6152\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":3,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6178\",\"type\":\"Line\"},{\"attributes\":{\"label\":{\"value\":\"y=x\"},\"renderers\":[{\"id\":\"6144\"},{\"id\":\"6162\"}]},\"id\":\"6157\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"6193\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6143\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"6194\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"6153\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"source\":{\"id\":\"6140\"}},\"id\":\"6145\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"6149\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"6151\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"6197\"}},\"id\":\"6202\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"orange\",\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6245\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"6154\",\"type\":\"Selection\"},{\"attributes\":{\"data\":{\"x\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0],\"y\":[1.2589254117941673,3.1622776601683795,10.0,31.622776601683793,100.0,316.22776601683796,1000.0]},\"selected\":{\"id\":\"6242\"},\"selection_policy\":{\"id\":\"6241\"}},\"id\":\"6220\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6200\",\"type\":\"Line\"},{\"attributes\":{\"ticker\":null},\"id\":\"6148\",\"type\":\"LogTickFormatter\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6199\",\"type\":\"Line\"},{\"attributes\":{\"line_color\":\"red\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6198\",\"type\":\"Line\"},{\"attributes\":{\"label\":{\"value\":\"y=10^x\"},\"renderers\":[{\"id\":\"6201\"},{\"id\":\"6224\"}]},\"id\":\"6219\",\"type\":\"LegendItem\"},{\"attributes\":{},\"id\":\"6217\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"6216\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"items\":[{\"id\":\"6157\"},{\"id\":\"6196\"},{\"id\":\"6219\"},{\"id\":\"6270\"}]},\"id\":\"6156\",\"type\":\"Legend\"}],\"root_ids\":[\"6107\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"6f57c0d1-0b76-4917-b02a-84c9d27e9faf\",\"root_ids\":[\"6107\"],\"roots\":{\"6107\":\"2cbaf9db-1560-44f9-91bf-d9166258ef23\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "6107"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# prepare some data\n",
    "x = [0.1, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0]\n",
    "y0 = [i**2 for i in x]\n",
    "y1 = [10**i for i in x]\n",
    "y2 = [10**(i**2) for i in x]\n",
    "\n",
    "# create a new plot with a logarithmic axis type\n",
    "p = figure(\n",
    "    title=\"Logarithmic axis example\",\n",
    "    sizing_mode=\"stretch_width\",\n",
    "    height=300,\n",
    "    max_width=500,\n",
    "    y_axis_type=\"log\",\n",
    "    y_range=[0.001, 10 ** 11],\n",
    "    x_axis_label=\"sections\",\n",
    "    y_axis_label=\"particles\",\n",
    ")\n",
    "\n",
    "# add some renderers\n",
    "p.line(x, x, legend_label=\"y=x\")\n",
    "p.circle(x, x, legend_label=\"y=x\", fill_color=\"white\", size=8)\n",
    "p.line(x, y0, legend_label=\"y=x^2\", line_width=3)\n",
    "p.line(x, y1, legend_label=\"y=10^x\", line_color=\"red\")\n",
    "p.circle(x, y1, legend_label=\"y=10^x\", fill_color=\"red\", line_color=\"red\", size=6)\n",
    "p.line(x, y2, legend_label=\"y=10^x^2\", line_color=\"orange\", line_dash=\"4 4\")\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "eb870953-4211-4a5a-84cf-10acef5ecf5d",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:24:38.661282Z",
     "iopub.status.busy": "2022-10-21T00:24:38.660856Z",
     "iopub.status.idle": "2022-10-21T00:24:38.832707Z",
     "shell.execute_reply": "2022-10-21T00:24:38.832236Z",
     "shell.execute_reply.started": "2022-10-21T00:24:38.661235Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"8855d10c-fc9b-49cb-8182-f2d4463f5483\" data-root-id=\"6807\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"b5d45535-216d-4e9a-9abb-d0377bc6819e\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"6818\"}],\"center\":[{\"id\":\"6821\"},{\"id\":\"6825\"}],\"height\":250,\"left\":[{\"id\":\"6822\"}],\"max_width\":500,\"renderers\":[{\"id\":\"6844\"},{\"id\":\"6850\"}],\"sizing_mode\":\"stretch_width\",\"title\":{\"id\":\"6808\"},\"toolbar\":{\"id\":\"6833\"},\"x_range\":{\"id\":\"6810\"},\"x_scale\":{\"id\":\"6814\"},\"y_range\":{\"id\":\"6812\"},\"y_scale\":{\"id\":\"6816\"}},\"id\":\"6807\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"format\":\"$0.00\"},\"id\":\"6852\",\"type\":\"NumeralTickFormatter\"},{\"attributes\":{\"days\":[1,15]},\"id\":\"7027\",\"type\":\"DaysTicker\"},{\"attributes\":{\"months\":[0,1,2,3,4,5,6,7,8,9,10,11]},\"id\":\"7028\",\"type\":\"MonthsTicker\"},{\"attributes\":{\"months\":[\"%b %Y\"]},\"id\":\"6854\",\"type\":\"DatetimeTickFormatter\"},{\"attributes\":{\"days\":[1,8,15,22]},\"id\":\"7026\",\"type\":\"DaysTicker\"},{\"attributes\":{},\"id\":\"6827\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"months\":[0,6]},\"id\":\"7031\",\"type\":\"MonthsTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6842\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"6826\",\"type\":\"PanTool\"},{\"attributes\":{\"months\":[0,2,4,6,8,10]},\"id\":\"7029\",\"type\":\"MonthsTicker\"},{\"attributes\":{\"source\":{\"id\":\"6846\"}},\"id\":\"6851\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"7018\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6841\",\"type\":\"Circle\"},{\"attributes\":{\"months\":[0,4,8]},\"id\":\"7030\",\"type\":\"MonthsTicker\"},{\"attributes\":{},\"id\":\"6823\",\"type\":\"BasicTicker\"},{\"attributes\":{\"overlay\":{\"id\":\"6832\"}},\"id\":\"6828\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6847\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"7019\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"6829\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"7013\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"7032\",\"type\":\"YearsTicker\"},{\"attributes\":{},\"id\":\"6830\",\"type\":\"ResetTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6848\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"7015\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"6840\"}},\"id\":\"6845\",\"type\":\"CDSView\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"6832\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"tools\":[{\"id\":\"6826\"},{\"id\":\"6827\"},{\"id\":\"6828\"},{\"id\":\"6829\"},{\"id\":\"6830\"},{\"id\":\"6831\"}]},\"id\":\"6833\",\"type\":\"Toolbar\"},{\"attributes\":{\"axis\":{\"id\":\"6822\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"6825\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"6852\"},\"group\":null,\"major_label_policy\":{\"id\":\"7013\"},\"ticker\":{\"id\":\"6823\"}},\"id\":\"6822\",\"type\":\"LinearAxis\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"navy\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6849\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"datetime axis example\"},\"id\":\"6808\",\"type\":\"Title\"},{\"attributes\":{\"base\":24,\"mantissas\":[1,2,4,6,8,12],\"max_interval\":43200000.0,\"min_interval\":3600000.0,\"num_minor_ticks\":0},\"id\":\"7023\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"6840\"},\"glyph\":{\"id\":\"6841\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"6843\"},\"nonselection_glyph\":{\"id\":\"6842\"},\"view\":{\"id\":\"6845\"}},\"id\":\"6844\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis\":{\"id\":\"6818\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"6821\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"6816\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"7016\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"num_minor_ticks\":5,\"tickers\":[{\"id\":\"7021\"},{\"id\":\"7022\"},{\"id\":\"7023\"},{\"id\":\"7024\"},{\"id\":\"7025\"},{\"id\":\"7026\"},{\"id\":\"7027\"},{\"id\":\"7028\"},{\"id\":\"7029\"},{\"id\":\"7030\"},{\"id\":\"7031\"},{\"id\":\"7032\"}]},\"id\":\"6819\",\"type\":\"DatetimeTicker\"},{\"attributes\":{},\"id\":\"6831\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"6812\",\"type\":\"DataRange1d\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"6846\"},\"glyph\":{\"id\":\"6847\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"6849\"},\"nonselection_glyph\":{\"id\":\"6848\"},\"view\":{\"id\":\"6851\"}},\"id\":\"6850\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[1666340678666.139,1666945478666.149,1667550278666.152,1668155078666.1528,1668759878666.1538,1669364678666.155,1669969478666.156,1670574278666.157,1671179078666.158,1671783878666.159,1672388678666.1602,1672993478666.1611,1673598278666.162,1674203078666.162,1674807878666.1638,1675412678666.165,1676017478666.166,1676622278666.166,1677227078666.167,1677831878666.168,1678436678666.169,1679041478666.17,1679646278666.1711,1680251078666.172,1680855878666.173,1681460678666.1738],\"y\":[57,70,13,86,72,82,52,45,81,87,39,6,35,1,55,38,88,31,49,60,30,71,47,15,11,21]},\"selected\":{\"id\":\"7017\"},\"selection_policy\":{\"id\":\"7016\"}},\"id\":\"6840\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"6814\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"6843\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"7017\",\"type\":\"Selection\"},{\"attributes\":{\"mantissas\":[1,2,5],\"max_interval\":500.0,\"num_minor_ticks\":0},\"id\":\"7021\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{\"base\":60,\"mantissas\":[1,2,5,10,15,20,30],\"max_interval\":1800000.0,\"min_interval\":1000.0,\"num_minor_ticks\":0},\"id\":\"7022\",\"type\":\"AdaptiveTicker\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"6854\"},\"group\":null,\"major_label_policy\":{\"id\":\"7015\"},\"ticker\":{\"id\":\"6819\"}},\"id\":\"6818\",\"type\":\"DatetimeAxis\"},{\"attributes\":{\"days\":[1,4,7,10,13,16,19,22,25,28]},\"id\":\"7025\",\"type\":\"DaysTicker\"},{\"attributes\":{\"data\":{\"x\":[1666340678666.139,1666945478666.149,1667550278666.152,1668155078666.1528,1668759878666.1538,1669364678666.155,1669969478666.156,1670574278666.157,1671179078666.158,1671783878666.159,1672388678666.1602,1672993478666.1611,1673598278666.162,1674203078666.162,1674807878666.1638,1675412678666.165,1676017478666.166,1676622278666.166,1677227078666.167,1677831878666.168,1678436678666.169,1679041478666.17,1679646278666.1711,1680251078666.172,1680855878666.173,1681460678666.1738],\"y\":[57,70,13,86,72,82,52,45,81,87,39,6,35,1,55,38,88,31,49,60,30,71,47,15,11,21]},\"selected\":{\"id\":\"7019\"},\"selection_policy\":{\"id\":\"7018\"}},\"id\":\"6846\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"6810\",\"type\":\"DataRange1d\"},{\"attributes\":{\"days\":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]},\"id\":\"7024\",\"type\":\"DaysTicker\"}],\"root_ids\":[\"6807\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"b5d45535-216d-4e9a-9abb-d0377bc6819e\",\"root_ids\":[\"6807\"],\"roots\":{\"6807\":\"8855d10c-fc9b-49cb-8182-f2d4463f5483\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "6807"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import random\n",
    "from datetime import datetime, timedelta\n",
    "\n",
    "from bokeh.models import DatetimeTickFormatter, NumeralTickFormatter\n",
    "from bokeh.plotting import figure, show\n",
    "\n",
    "# generate list of dates (today's date in subsequent weeks)\n",
    "dates = [(datetime.now() + timedelta(day * 7)) for day in range(0, 26)]\n",
    "\n",
    "# generate 25 random data points\n",
    "y = random.sample(range(0, 100), 26)\n",
    "\n",
    "# create new plot\n",
    "p = figure(\n",
    "    title=\"datetime axis example\",\n",
    "    x_axis_type=\"datetime\",\n",
    "    sizing_mode=\"stretch_width\",\n",
    "    max_width=500,\n",
    "    height=250,\n",
    ")\n",
    "\n",
    "# add renderers\n",
    "p.circle(dates, y, size=8)\n",
    "p.line(dates, y, color=\"navy\", line_width=1)\n",
    "\n",
    "# format axes ticks\n",
    "p.yaxis[0].formatter = NumeralTickFormatter(format=\"$0.00\")\n",
    "p.xaxis[0].formatter = DatetimeTickFormatter(months=\"%b %Y\")\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ca5b63c8-484a-4151-89f1-281b2cbda084",
   "metadata": {},
   "source": [
    "## 坐标轴网格"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "db1e25d3-3ec3-47df-a567-ed5f3eb8ad42",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:24:53.616073Z",
     "iopub.status.busy": "2022-10-21T00:24:53.615626Z",
     "iopub.status.idle": "2022-10-21T00:24:53.740833Z",
     "shell.execute_reply": "2022-10-21T00:24:53.740378Z",
     "shell.execute_reply.started": "2022-10-21T00:24:53.616023Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"d3b352f9-3074-416e-a93e-1cde5ddb023d\" data-root-id=\"7452\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"9d9feb27-ac8d-453c-b430-30cf1f5e9977\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"7463\"}],\"center\":[{\"id\":\"7466\"},{\"id\":\"7470\"}],\"height\":250,\"left\":[{\"id\":\"7467\"}],\"max_width\":500,\"renderers\":[{\"id\":\"7489\"}],\"sizing_mode\":\"stretch_width\",\"title\":{\"id\":\"7453\"},\"toolbar\":{\"id\":\"7478\"},\"x_range\":{\"id\":\"7455\"},\"x_scale\":{\"id\":\"7459\"},\"y_range\":{\"id\":\"7457\"},\"y_scale\":{\"id\":\"7461\"}},\"id\":\"7452\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"7673\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"7675\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"7485\"},\"glyph\":{\"id\":\"7486\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"7488\"},\"nonselection_glyph\":{\"id\":\"7487\"},\"view\":{\"id\":\"7490\"}},\"id\":\"7489\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"7475\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"7474\",\"type\":\"SaveTool\"},{\"attributes\":{\"overlay\":{\"id\":\"7477\"}},\"id\":\"7473\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"tools\":[{\"id\":\"7471\"},{\"id\":\"7472\"},{\"id\":\"7473\"},{\"id\":\"7474\"},{\"id\":\"7475\"},{\"id\":\"7476\"}]},\"id\":\"7478\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"7674\",\"type\":\"AllLabels\"},{\"attributes\":{\"source\":{\"id\":\"7485\"}},\"id\":\"7490\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"7670\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"7673\"},\"group\":null,\"major_label_policy\":{\"id\":\"7674\"},\"ticker\":{\"id\":\"7464\"}},\"id\":\"7463\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"7471\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"7676\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"7671\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"7476\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"7461\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"7464\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"7457\",\"type\":\"DataRange1d\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"7670\"},\"group\":null,\"major_label_policy\":{\"id\":\"7671\"},\"ticker\":{\"id\":\"7468\"}},\"id\":\"7467\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"7472\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Customized grid lines example\"},\"id\":\"7453\",\"type\":\"Title\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"green\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"7487\",\"type\":\"Line\"},{\"attributes\":{\"axis\":{\"id\":\"7467\"},\"coordinates\":null,\"dimension\":1,\"grid_line_alpha\":0.8,\"grid_line_dash\":[6,4],\"group\":null,\"ticker\":null},\"id\":\"7470\",\"type\":\"Grid\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"green\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"7488\",\"type\":\"Line\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"7477\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"7459\",\"type\":\"LinearScale\"},{\"attributes\":{\"line_color\":\"green\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"7486\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"7468\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"7676\"},\"selection_policy\":{\"id\":\"7675\"}},\"id\":\"7485\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"7455\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis\":{\"id\":\"7463\"},\"coordinates\":null,\"grid_line_color\":\"red\",\"group\":null,\"ticker\":null},\"id\":\"7466\",\"type\":\"Grid\"}],\"root_ids\":[\"7452\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"9d9feb27-ac8d-453c-b430-30cf1f5e9977\",\"root_ids\":[\"7452\"],\"roots\":{\"7452\":\"d3b352f9-3074-416e-a93e-1cde5ddb023d\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "7452"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [4, 5, 5, 7, 2]\n",
    "\n",
    "# create a plot\n",
    "p = figure(\n",
    "    title=\"Customized grid lines example\",\n",
    "    sizing_mode=\"stretch_width\",\n",
    "    max_width=500,\n",
    "    height=250,\n",
    ")\n",
    "\n",
    "# add a renderer\n",
    "p.line(x, y, line_color=\"green\", line_width=2)\n",
    "\n",
    "# change things only on the x-grid\n",
    "p.xgrid.grid_line_color = \"red\"\n",
    "\n",
    "# change things only on the y-grid\n",
    "p.ygrid.grid_line_alpha = 0.8\n",
    "p.ygrid.grid_line_dash = [6, 4]\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "004c8276-f4fd-4044-b924-920d651f6356",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:25:04.420352Z",
     "iopub.status.busy": "2022-10-21T00:25:04.419776Z",
     "iopub.status.idle": "2022-10-21T00:25:04.549761Z",
     "shell.execute_reply": "2022-10-21T00:25:04.549294Z",
     "shell.execute_reply.started": "2022-10-21T00:25:04.420302Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"61744ed8-d307-4fed-a3b7-5c270a3ab587\" data-root-id=\"7869\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"b595e577-86a0-4c4a-957c-9e345e1869b0\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"7880\"}],\"center\":[{\"id\":\"7883\"},{\"id\":\"7887\"}],\"height\":250,\"left\":[{\"id\":\"7884\"}],\"max_width\":500,\"renderers\":[{\"id\":\"7906\"}],\"sizing_mode\":\"stretch_width\",\"title\":{\"id\":\"7870\"},\"toolbar\":{\"id\":\"7895\"},\"x_range\":{\"id\":\"7872\"},\"x_scale\":{\"id\":\"7876\"},\"y_range\":{\"id\":\"7874\"},\"y_scale\":{\"id\":\"7878\"}},\"id\":\"7869\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"7889\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"7892\",\"type\":\"ResetTool\"},{\"attributes\":{\"axis\":{\"id\":\"7880\"},\"bounds\":[2,4],\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"7883\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"7888\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"7891\",\"type\":\"SaveTool\"},{\"attributes\":{\"tools\":[{\"id\":\"7888\"},{\"id\":\"7889\"},{\"id\":\"7890\"},{\"id\":\"7891\"},{\"id\":\"7892\"},{\"id\":\"7893\"}]},\"id\":\"7895\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"7885\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"7884\"},\"band_fill_alpha\":0.1,\"band_fill_color\":\"olive\",\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"7887\",\"type\":\"Grid\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"8103\"},\"selection_policy\":{\"id\":\"8102\"}},\"id\":\"7902\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"7881\",\"type\":\"BasicTicker\"},{\"attributes\":{\"overlay\":{\"id\":\"7894\"}},\"id\":\"7890\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"7894\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"8097\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"green\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"7904\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"8097\"},\"group\":null,\"major_label_policy\":{\"id\":\"8098\"},\"ticker\":{\"id\":\"7885\"}},\"id\":\"7884\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"7878\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"8103\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"8098\",\"type\":\"AllLabels\"},{\"attributes\":{\"line_color\":\"green\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"7903\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"8100\"},\"group\":null,\"major_label_policy\":{\"id\":\"8101\"},\"ticker\":{\"id\":\"7881\"}},\"id\":\"7880\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"8100\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"8102\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"7893\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"8101\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"7872\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"7876\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"7902\"}},\"id\":\"7907\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"7902\"},\"glyph\":{\"id\":\"7903\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"7905\"},\"nonselection_glyph\":{\"id\":\"7904\"},\"view\":{\"id\":\"7907\"}},\"id\":\"7906\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"7874\",\"type\":\"DataRange1d\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"green\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"7905\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Bands and bonds example\"},\"id\":\"7870\",\"type\":\"Title\"}],\"root_ids\":[\"7869\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"b595e577-86a0-4c4a-957c-9e345e1869b0\",\"root_ids\":[\"7869\"],\"roots\":{\"7869\":\"61744ed8-d307-4fed-a3b7-5c270a3ab587\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "7869"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "\n",
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [4, 5, 5, 7, 2]\n",
    "\n",
    "# create a plot\n",
    "p = figure(\n",
    "    title=\"Bands and bonds example\",\n",
    "    sizing_mode=\"stretch_width\",\n",
    "    max_width=500,\n",
    "    height=250,\n",
    ")\n",
    "\n",
    "# add a renderer\n",
    "p.line(x, y, line_color=\"green\", line_width=2)\n",
    "\n",
    "# add bands to the y-grid\n",
    "p.ygrid.band_fill_color = \"olive\"\n",
    "p.ygrid.band_fill_alpha = 0.1\n",
    "\n",
    "# define vertical bonds\n",
    "p.xgrid.bounds = (2, 4)\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7daa2242-e558-4b50-b4cf-27fb29d0ccae",
   "metadata": {},
   "source": [
    "## 背景颜色"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "09da9ffc-c348-41c8-b7ad-aecbf012bcdd",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:25:16.209636Z",
     "iopub.status.busy": "2022-10-21T00:25:16.209010Z",
     "iopub.status.idle": "2022-10-21T00:25:16.340836Z",
     "shell.execute_reply": "2022-10-21T00:25:16.340440Z",
     "shell.execute_reply.started": "2022-10-21T00:25:16.209584Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"cbea5894-1660-45d2-b979-96b7c9d30473\" data-root-id=\"8296\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"c5fd49a0-9beb-483a-b736-9f0ad2aa130d\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"background_fill_color\":\"rgb(204, 255, 255)\",\"below\":[{\"id\":\"8307\"}],\"border_fill_color\":\"rgb(102, 204, 255)\",\"center\":[{\"id\":\"8310\"},{\"id\":\"8314\"}],\"height\":250,\"left\":[{\"id\":\"8311\"}],\"max_width\":500,\"outline_line_color\":\"rgb(0, 0, 255)\",\"renderers\":[{\"id\":\"8333\"}],\"sizing_mode\":\"stretch_width\",\"title\":{\"id\":\"8297\"},\"toolbar\":{\"id\":\"8322\"},\"x_range\":{\"id\":\"8299\"},\"x_scale\":{\"id\":\"8303\"},\"y_range\":{\"id\":\"8301\"},\"y_scale\":{\"id\":\"8305\"}},\"id\":\"8296\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"8319\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"8303\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"8301\",\"type\":\"DataRange1d\"},{\"attributes\":{\"overlay\":{\"id\":\"8321\"}},\"id\":\"8317\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"8534\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis\":{\"id\":\"8307\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"8310\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"8538\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"8537\"},\"group\":null,\"major_label_policy\":{\"id\":\"8538\"},\"ticker\":{\"id\":\"8308\"}},\"id\":\"8307\",\"type\":\"LinearAxis\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"8321\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"8537\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"8318\",\"type\":\"SaveTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"green\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"8331\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"8305\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"8329\"}},\"id\":\"8334\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"8299\",\"type\":\"DataRange1d\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"green\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"8332\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"8329\"},\"glyph\":{\"id\":\"8330\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"8332\"},\"nonselection_glyph\":{\"id\":\"8331\"},\"view\":{\"id\":\"8334\"}},\"id\":\"8333\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"8308\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"8539\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"8316\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"8534\"},\"group\":null,\"major_label_policy\":{\"id\":\"8535\"},\"ticker\":{\"id\":\"8312\"}},\"id\":\"8311\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"8540\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"8315\",\"type\":\"PanTool\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"8540\"},\"selection_policy\":{\"id\":\"8539\"}},\"id\":\"8329\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"8320\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Background colors example\"},\"id\":\"8297\",\"type\":\"Title\"},{\"attributes\":{\"tools\":[{\"id\":\"8315\"},{\"id\":\"8316\"},{\"id\":\"8317\"},{\"id\":\"8318\"},{\"id\":\"8319\"},{\"id\":\"8320\"}]},\"id\":\"8322\",\"type\":\"Toolbar\"},{\"attributes\":{\"line_color\":\"green\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"8330\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"8312\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"8535\",\"type\":\"AllLabels\"},{\"attributes\":{\"axis\":{\"id\":\"8311\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"8314\",\"type\":\"Grid\"}],\"root_ids\":[\"8296\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"c5fd49a0-9beb-483a-b736-9f0ad2aa130d\",\"root_ids\":[\"8296\"],\"roots\":{\"8296\":\"cbea5894-1660-45d2-b979-96b7c9d30473\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "8296"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [4, 5, 5, 7, 2]\n",
    "\n",
    "# create a plot\n",
    "p = figure(\n",
    "    title=\"Background colors example\",\n",
    "    sizing_mode=\"stretch_width\",\n",
    "    max_width=500,\n",
    "    height=250,\n",
    ")\n",
    "\n",
    "# add a renderer\n",
    "p.line(x, y, line_color=\"green\", line_width=2)\n",
    "\n",
    "# change the fill colors\n",
    "p.background_fill_color = (204, 255, 255)\n",
    "p.border_fill_color = (102, 204, 255)\n",
    "p.outline_line_color = (0, 0, 255)\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "9d1cad77-de2d-477c-a435-dd68634e897b",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:25:30.185837Z",
     "iopub.status.busy": "2022-10-21T00:25:30.185239Z",
     "iopub.status.idle": "2022-10-21T00:25:30.319655Z",
     "shell.execute_reply": "2022-10-21T00:25:30.319281Z",
     "shell.execute_reply.started": "2022-10-21T00:25:30.185784Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"bb69bcdc-61c8-4bf2-b38d-f64aa6b6aa99\" data-root-id=\"8733\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"13fbf2b7-a660-4ead-a2b7-fe15892ce6e8\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"8744\"}],\"center\":[{\"id\":\"8747\"},{\"id\":\"8751\"}],\"height\":250,\"left\":[{\"id\":\"8748\"}],\"max_width\":500,\"renderers\":[{\"id\":\"8771\"}],\"sizing_mode\":\"stretch_width\",\"title\":{\"id\":\"8734\"},\"toolbar\":{\"id\":\"8759\"},\"x_range\":{\"id\":\"8736\"},\"x_scale\":{\"id\":\"8740\"},\"y_range\":{\"id\":\"8738\"},\"y_scale\":{\"id\":\"8742\"}},\"id\":\"8733\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"8770\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"8756\",\"type\":\"ResetTool\"},{\"attributes\":{\"source\":{\"id\":\"8767\"}},\"id\":\"8772\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"8768\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"8736\",\"type\":\"DataRange1d\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"8769\",\"type\":\"Line\"},{\"attributes\":{},\"id\":\"8752\",\"type\":\"PanTool\"},{\"attributes\":{\"autohide\":true,\"tools\":[{\"id\":\"8752\"},{\"id\":\"8753\"},{\"id\":\"8754\"},{\"id\":\"8755\"},{\"id\":\"8756\"},{\"id\":\"8757\"}]},\"id\":\"8759\",\"type\":\"Toolbar\"},{\"attributes\":{\"axis\":{\"id\":\"8744\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"8747\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"8986\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"8985\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"8757\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"8740\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"8755\",\"type\":\"SaveTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"8767\"},\"glyph\":{\"id\":\"8768\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"8770\"},\"nonselection_glyph\":{\"id\":\"8769\"},\"view\":{\"id\":\"8772\"}},\"id\":\"8771\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"overlay\":{\"id\":\"8758\"}},\"id\":\"8754\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"8985\"},\"group\":null,\"major_label_policy\":{\"id\":\"8986\"},\"ticker\":{\"id\":\"8745\"}},\"id\":\"8744\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"8742\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"8987\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"8758\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"8745\",\"type\":\"BasicTicker\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"8988\"},\"selection_policy\":{\"id\":\"8987\"}},\"id\":\"8767\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"8988\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"8738\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"8753\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"axis\":{\"id\":\"8748\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"8751\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"8983\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"8982\"},\"group\":null,\"major_label_policy\":{\"id\":\"8983\"},\"ticker\":{\"id\":\"8749\"}},\"id\":\"8748\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"8749\",\"type\":\"BasicTicker\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Toolbar autohide example\"},\"id\":\"8734\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"8982\",\"type\":\"BasicTickFormatter\"}],\"root_ids\":[\"8733\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"13fbf2b7-a660-4ead-a2b7-fe15892ce6e8\",\"root_ids\":[\"8733\"],\"roots\":{\"8733\":\"bb69bcdc-61c8-4bf2-b38d-f64aa6b6aa99\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "8733"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [4, 5, 5, 7, 2]\n",
    "\n",
    "# create a plot\n",
    "p = figure(\n",
    "    title=\"Toolbar autohide example\",\n",
    "    sizing_mode=\"stretch_width\",\n",
    "    max_width=500,\n",
    "    height=250,\n",
    ")\n",
    "\n",
    "# activate toolbar autohide\n",
    "p.toolbar.autohide = True\n",
    "\n",
    "# add a renderer\n",
    "p.line(x, y)\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e17bc5fa-86b6-478b-88ca-150f9da15368",
   "metadata": {},
   "source": [
    "## 图例标识"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "55d756a5-9134-4fc3-997b-ef09d31a2afb",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:25:51.765129Z",
     "iopub.status.busy": "2022-10-21T00:25:51.764695Z",
     "iopub.status.idle": "2022-10-21T00:25:51.908606Z",
     "shell.execute_reply": "2022-10-21T00:25:51.908192Z",
     "shell.execute_reply.started": "2022-10-21T00:25:51.765081Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"8e3b3ce8-5b3f-4413-bc4f-612207a6ec3b\" data-root-id=\"9183\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"e46119be-96b7-432a-b6b3-bcb559c24fb3\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"9194\"}],\"center\":[{\"id\":\"9197\"},{\"id\":\"9201\"}],\"height\":250,\"left\":[{\"id\":\"9198\"}],\"max_width\":500,\"renderers\":[{\"id\":\"9212\"}],\"sizing_mode\":\"stretch_width\",\"title\":{\"id\":\"9184\"},\"toolbar\":{\"id\":\"9203\"},\"x_range\":{\"id\":\"9186\"},\"x_scale\":{\"id\":\"9190\"},\"y_range\":{\"id\":\"9188\"},\"y_scale\":{\"id\":\"9192\"}},\"id\":\"9183\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"9433\"},\"group\":null,\"major_label_policy\":{\"id\":\"9434\"},\"ticker\":{\"id\":\"9199\"}},\"id\":\"9198\",\"type\":\"LinearAxis\"},{\"attributes\":{\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"9209\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"9199\",\"type\":\"BasicTicker\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"9202\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"source\":{\"id\":\"9208\"}},\"id\":\"9213\",\"type\":\"CDSView\"},{\"attributes\":{\"tools\":[{\"id\":\"9181\"},{\"id\":\"9182\"},{\"id\":\"9206\"}]},\"id\":\"9203\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"9195\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"9211\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"9434\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"9438\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"9436\"},\"group\":null,\"major_label_policy\":{\"id\":\"9437\"},\"ticker\":{\"id\":\"9195\"}},\"id\":\"9194\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"9433\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis\":{\"id\":\"9194\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"9197\",\"type\":\"Grid\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Modifying tools example\"},\"id\":\"9184\",\"type\":\"Title\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"9439\"},\"selection_policy\":{\"id\":\"9438\"}},\"id\":\"9208\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"9208\"},\"glyph\":{\"id\":\"9209\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"9211\"},\"nonselection_glyph\":{\"id\":\"9210\"},\"view\":{\"id\":\"9213\"}},\"id\":\"9212\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis\":{\"id\":\"9198\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"9201\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"9436\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"overlay\":{\"id\":\"9202\"}},\"id\":\"9181\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"9192\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"9437\",\"type\":\"AllLabels\"},{\"attributes\":{\"dimensions\":\"width\"},\"id\":\"9206\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"9186\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"9190\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"9188\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"9182\",\"type\":\"ResetTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"9210\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"9439\",\"type\":\"Selection\"}],\"root_ids\":[\"9183\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"e46119be-96b7-432a-b6b3-bcb559c24fb3\",\"root_ids\":[\"9183\"],\"roots\":{\"9183\":\"8e3b3ce8-5b3f-4413-bc4f-612207a6ec3b\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "9183"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from bokeh.models import BoxZoomTool, PanTool, ResetTool\n",
    "\n",
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [4, 5, 5, 7, 2]\n",
    "\n",
    "# create a plot\n",
    "p = figure(\n",
    "    title=\"Modifying tools example\",\n",
    "    tools=[BoxZoomTool(), ResetTool()],\n",
    "    sizing_mode=\"stretch_width\",\n",
    "    max_width=500,\n",
    "    height=250,\n",
    ")\n",
    "\n",
    "# add an additional pan tool\n",
    "# only vertical panning is allowed\n",
    "p.add_tools(PanTool(dimensions=\"width\"))\n",
    "\n",
    "# add a renderer\n",
    "p.circle(x, y, size=10)\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "f3a46b87-eec3-48e7-ab0e-a2fdfb7c6540",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:26:31.834880Z",
     "iopub.status.busy": "2022-10-21T00:26:31.834314Z",
     "iopub.status.idle": "2022-10-21T00:26:31.988149Z",
     "shell.execute_reply": "2022-10-21T00:26:31.987686Z",
     "shell.execute_reply.started": "2022-10-21T00:26:31.834831Z"
    },
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"33795b22-4748-4a4f-90d8-0d3319d4c159\" data-root-id=\"9633\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"4a3f2aff-c78c-4788-924d-49a3c17ba34e\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"9642\"}],\"center\":[{\"id\":\"9645\"},{\"id\":\"9649\"}],\"height\":250,\"left\":[{\"id\":\"9646\"}],\"max_width\":500,\"renderers\":[{\"id\":\"9656\"},{\"id\":\"9662\"}],\"sizing_mode\":\"stretch_width\",\"title\":{\"id\":\"9891\"},\"toolbar\":{\"id\":\"9650\"},\"toolbar_location\":null,\"x_range\":{\"id\":\"9634\"},\"x_scale\":{\"id\":\"9638\"},\"y_range\":{\"id\":\"9636\"},\"y_scale\":{\"id\":\"9640\"}},\"id\":\"9633\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"9660\",\"type\":\"Line\"},{\"attributes\":{\"axis\":{\"id\":\"9646\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"9649\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"9652\"}},\"id\":\"9657\",\"type\":\"CDSView\"},{\"attributes\":{\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"9659\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"#1f77b4\",\"line_width\":2,\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"9661\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"9658\"},\"glyph\":{\"id\":\"9659\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"9661\"},\"nonselection_glyph\":{\"id\":\"9660\"},\"view\":{\"id\":\"9663\"}},\"id\":\"9662\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"axis\":{\"id\":\"9642\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"9645\",\"type\":\"Grid\"},{\"attributes\":{\"source\":{\"id\":\"9658\"}},\"id\":\"9663\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"9643\",\"type\":\"BasicTicker\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"9891\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"9640\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"9901\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"9902\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"9895\",\"type\":\"AllLabels\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"9900\"},\"selection_policy\":{\"id\":\"9899\"}},\"id\":\"9652\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"9652\"},\"glyph\":{\"id\":\"9653\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"9655\"},\"nonselection_glyph\":{\"id\":\"9654\"},\"view\":{\"id\":\"9657\"}},\"id\":\"9656\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"tools\":[{\"id\":\"9632\"}]},\"id\":\"9650\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"9897\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"9894\"},\"group\":null,\"major_label_policy\":{\"id\":\"9895\"},\"ticker\":{\"id\":\"9647\"}},\"id\":\"9646\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"9898\",\"type\":\"AllLabels\"},{\"attributes\":{\"end\":10},\"id\":\"9636\",\"type\":\"Range1d\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5],\"y\":[4,5,5,7,2]},\"selected\":{\"id\":\"9902\"},\"selection_policy\":{\"id\":\"9901\"}},\"id\":\"9658\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"9638\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"9894\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"9634\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"9654\",\"type\":\"Circle\"},{\"attributes\":{\"callback\":null,\"tooltips\":\"Data point @x has the value @y\"},\"id\":\"9632\",\"type\":\"HoverTool\"},{\"attributes\":{\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"9653\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"9899\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#1f77b4\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"9655\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"9900\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"9647\",\"type\":\"BasicTicker\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"9897\"},\"group\":null,\"major_label_policy\":{\"id\":\"9898\"},\"ticker\":{\"id\":\"9643\"}},\"id\":\"9642\",\"type\":\"LinearAxis\"}],\"root_ids\":[\"9633\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"4a3f2aff-c78c-4788-924d-49a3c17ba34e\",\"root_ids\":[\"9633\"],\"roots\":{\"9633\":\"33795b22-4748-4a4f-90d8-0d3319d4c159\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "9633"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from bokeh.models import HoverTool\n",
    "\n",
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [4, 5, 5, 7, 2]\n",
    "\n",
    "p = figure(\n",
    "    y_range=(0, 10),\n",
    "    toolbar_location=None,\n",
    "    tools=[HoverTool()],\n",
    "    tooltips=\"Data point @x has the value @y\",\n",
    "    sizing_mode=\"stretch_width\",\n",
    "    max_width=500,\n",
    "    height=250,\n",
    ")\n",
    "\n",
    "# add renderers\n",
    "p.circle(x, y, size=10)\n",
    "p.line(x, y, line_width=2)\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6418b083-1525-4de1-b35e-74d91ee7dec3",
   "metadata": {},
   "source": [
    "# 设置颜色"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "fffbefcc-0f0a-4046-ac4c-d6312dc858b9",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:51:51.980507Z",
     "iopub.status.busy": "2022-10-21T00:51:51.980083Z",
     "iopub.status.idle": "2022-10-21T00:51:52.149175Z",
     "shell.execute_reply": "2022-10-21T00:51:52.148723Z",
     "shell.execute_reply.started": "2022-10-21T00:51:51.980458Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"14c71501-e7ed-4c90-bb59-9941b828aa79\" data-root-id=\"10132\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"802fdbfa-c431-45f6-b461-7d53248fa4e9\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"10143\"}],\"center\":[{\"id\":\"10146\"},{\"id\":\"10150\"}],\"height\":250,\"left\":[{\"id\":\"10147\"}],\"max_width\":500,\"renderers\":[{\"id\":\"10169\"},{\"id\":\"10175\"}],\"sizing_mode\":\"stretch_width\",\"title\":{\"id\":\"10133\"},\"toolbar\":{\"id\":\"10158\"},\"x_range\":{\"id\":\"10135\"},\"x_scale\":{\"id\":\"10139\"},\"y_range\":{\"id\":\"10137\"},\"y_scale\":{\"id\":\"10141\"}},\"id\":\"10132\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_color\":{\"field\":\"fill_color\"},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"10172\",\"type\":\"Circle\"},{\"attributes\":{\"data\":{\"x\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],\"y\":[85,51,31,9,5,73,18,97,98,35,72,66,36,76,41,29,53,48,78,57,68,95,4,56,22,45]},\"selected\":{\"id\":\"10424\"},\"selection_policy\":{\"id\":\"10423\"}},\"id\":\"10165\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data\":{\"fill_color\":[\"#ffd9ff\",\"#ff82ff\",\"#ff4fff\",\"#ff17ff\",\"#ff0dff\",\"#ffbaff\",\"#ff2eff\",\"#fff7ff\",\"#fffaff\",\"#ff59ff\",\"#ffb8ff\",\"#ffa8ff\",\"#ff5cff\",\"#ffc2ff\",\"#ff69ff\",\"#ff4aff\",\"#ff87ff\",\"#ff7aff\",\"#ffc7ff\",\"#ff91ff\",\"#ffadff\",\"#fff2ff\",\"#ff0aff\",\"#ff8fff\",\"#ff38ff\",\"#ff73ff\"],\"x\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],\"y\":[85,51,31,9,5,73,18,97,98,35,72,66,36,76,41,29,53,48,78,57,68,95,4,56,22,45]},\"selected\":{\"id\":\"10426\"},\"selection_policy\":{\"id\":\"10425\"}},\"id\":\"10171\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"source\":{\"id\":\"10165\"}},\"id\":\"10170\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"10424\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"10135\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"10137\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"10425\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"10139\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"10421\"},\"group\":null,\"major_label_policy\":{\"id\":\"10422\"},\"ticker\":{\"id\":\"10144\"}},\"id\":\"10143\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"10426\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Vectorized colors example\"},\"id\":\"10133\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"10422\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"10144\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"10141\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"10148\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"10143\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"10146\",\"type\":\"Grid\"},{\"attributes\":{\"line_alpha\":0.2,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"10168\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"field\":\"fill_color\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"10174\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"10152\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"10421\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"10151\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"10157\"}},\"id\":\"10153\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"10419\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"10165\"},\"glyph\":{\"id\":\"10166\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"10168\"},\"nonselection_glyph\":{\"id\":\"10167\"},\"view\":{\"id\":\"10170\"}},\"id\":\"10169\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"10154\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"10156\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"10418\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"10157\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"10166\",\"type\":\"Line\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"10418\"},\"group\":null,\"major_label_policy\":{\"id\":\"10419\"},\"ticker\":{\"id\":\"10148\"}},\"id\":\"10147\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"10155\",\"type\":\"ResetTool\"},{\"attributes\":{\"line_alpha\":0.1,\"line_color\":\"blue\",\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"10167\",\"type\":\"Line\"},{\"attributes\":{\"source\":{\"id\":\"10171\"}},\"id\":\"10176\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"10423\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"field\":\"fill_color\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"blue\"},\"size\":{\"value\":15},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"10173\",\"type\":\"Circle\"},{\"attributes\":{\"axis\":{\"id\":\"10147\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"10150\",\"type\":\"Grid\"},{\"attributes\":{\"tools\":[{\"id\":\"10151\"},{\"id\":\"10152\"},{\"id\":\"10153\"},{\"id\":\"10154\"},{\"id\":\"10155\"},{\"id\":\"10156\"}]},\"id\":\"10158\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"10171\"},\"glyph\":{\"id\":\"10172\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"10174\"},\"nonselection_glyph\":{\"id\":\"10173\"},\"view\":{\"id\":\"10176\"}},\"id\":\"10175\",\"type\":\"GlyphRenderer\"}],\"root_ids\":[\"10132\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"802fdbfa-c431-45f6-b461-7d53248fa4e9\",\"root_ids\":[\"10132\"],\"roots\":{\"10132\":\"14c71501-e7ed-4c90-bb59-9941b828aa79\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "10132"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import random\n",
    "\n",
    "# generate some data (1-10 for x, random values for y)\n",
    "x = list(range(0, 26))\n",
    "y = random.sample(range(0, 100), 26)\n",
    "\n",
    "# generate list of rgb hex colors in relation to y\n",
    "colors = [\"#%02x%02x%02x\" % (255, int(round(value * 255 / 100)), 255) for value in y]\n",
    "\n",
    "# create new plot\n",
    "p = figure(\n",
    "    title=\"Vectorized colors example\",\n",
    "    sizing_mode=\"stretch_width\",\n",
    "    max_width=500,\n",
    "    height=250,\n",
    ")\n",
    "\n",
    "# add circle and line renderers\n",
    "line = p.line(x, y, line_color=\"blue\", line_width=1)\n",
    "circle = p.circle(x, y, fill_color=colors, line_color=\"blue\", size=15)\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "2051c287-13e6-43ff-b006-70331c94563d",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:52:07.314096Z",
     "iopub.status.busy": "2022-10-21T00:52:07.313657Z",
     "iopub.status.idle": "2022-10-21T00:52:07.479963Z",
     "shell.execute_reply": "2022-10-21T00:52:07.479487Z",
     "shell.execute_reply.started": "2022-10-21T00:52:07.314041Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"15ceed9c-f3b8-43f8-9de1-0ff0922c24a5\" data-root-id=\"10657\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"43dc04cb-2dec-4b43-9c5a-ffac9bfaa746\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"10668\"}],\"center\":[{\"id\":\"10671\"},{\"id\":\"10675\"}],\"height\":250,\"left\":[{\"id\":\"10672\"}],\"max_width\":500,\"renderers\":[{\"id\":\"10694\"}],\"sizing_mode\":\"stretch_width\",\"title\":{\"id\":\"10658\"},\"toolbar\":{\"id\":\"10683\"},\"x_range\":{\"id\":\"10660\"},\"x_scale\":{\"id\":\"10664\"},\"y_range\":{\"id\":\"10662\"},\"y_scale\":{\"id\":\"10666\"}},\"id\":\"10657\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"10680\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"10679\",\"type\":\"SaveTool\"},{\"attributes\":{\"overlay\":{\"id\":\"10682\"}},\"id\":\"10678\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"10676\",\"type\":\"PanTool\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"10690\"},\"glyph\":{\"id\":\"10691\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"10693\"},\"nonselection_glyph\":{\"id\":\"10692\"},\"view\":{\"id\":\"10695\"}},\"id\":\"10694\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"10677\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"10673\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"10672\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"10675\",\"type\":\"Grid\"},{\"attributes\":{\"tools\":[{\"id\":\"10676\"},{\"id\":\"10677\"},{\"id\":\"10678\"},{\"id\":\"10679\"},{\"id\":\"10680\"},{\"id\":\"10681\"}]},\"id\":\"10683\",\"type\":\"Toolbar\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"field\":\"fill_color\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"lightgrey\"},\"radius\":{\"field\":\"radius\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"10693\",\"type\":\"Circle\"},{\"attributes\":{\"axis\":{\"id\":\"10668\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"10671\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"10666\",\"type\":\"LinearScale\"},{\"attributes\":{\"source\":{\"id\":\"10690\"}},\"id\":\"10695\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"10669\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"10950\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"10952\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"10681\",\"type\":\"HelpTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null,\"text\":\"Vectorized colors and radii example\"},\"id\":\"10658\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"10954\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"10949\"},\"group\":null,\"major_label_policy\":{\"id\":\"10950\"},\"ticker\":{\"id\":\"10673\"}},\"id\":\"10672\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"10953\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"10952\"},\"group\":null,\"major_label_policy\":{\"id\":\"10953\"},\"ticker\":{\"id\":\"10669\"}},\"id\":\"10668\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"10664\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"10662\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.6},\"fill_color\":{\"field\":\"fill_color\"},\"line_color\":{\"value\":\"lightgrey\"},\"radius\":{\"field\":\"radius\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"10691\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"10955\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"field\":\"fill_color\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"lightgrey\"},\"radius\":{\"field\":\"radius\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"10692\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"10660\",\"type\":\"DataRange1d\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"10682\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"data\":{\"fill_color\":[\"#ffb3ff\",\"#ff54ff\",\"#ffa4ff\",\"#ffecff\",\"#ffa1ff\",\"#ffb2ff\",\"#ffffff\",\"#ffd3ff\",\"#ff85ff\",\"#ffe9ff\",\"#ff41ff\",\"#ff16ff\",\"#ff58ff\",\"#ff39ff\",\"#ff71ff\",\"#ff63ff\",\"#ffe8ff\",\"#ff03ff\",\"#ffbfff\",\"#ff04ff\",\"#ffe7ff\",\"#ff04ff\",\"#ffa0ff\",\"#ff8fff\",\"#ffe7ff\",\"#ff62ff\",\"#ff6cff\",\"#ff7cff\",\"#ffb3ff\",\"#ffb4ff\",\"#ff50ff\",\"#ff87ff\",\"#ffa1ff\",\"#ffc6ff\",\"#ffb4ff\",\"#ff4aff\",\"#ff79ff\",\"#ff8dff\",\"#ff6aff\",\"#ff87ff\",\"#ff7aff\",\"#ffbdff\",\"#ffc4ff\",\"#ff30ff\",\"#ff0cff\",\"#ffdcff\",\"#ff2bff\",\"#ff31ff\",\"#ff3cff\",\"#ff12ff\",\"#ffe2ff\",\"#ff13ff\",\"#ff22ff\",\"#ff0bff\",\"#ff90ff\",\"#ff6dff\",\"#ff63ff\",\"#ff16ff\",\"#ffbaff\",\"#ff9dff\",\"#ff70ff\",\"#ff19ff\",\"#ff95ff\",\"#ff59ff\",\"#ff42ff\",\"#ffbbff\",\"#ffeaff\",\"#ffb5ff\",\"#ff42ff\",\"#ff82ff\",\"#fff4ff\",\"#ff06ff\",\"#ffd9ff\",\"#ff3dff\",\"#ffd6ff\",\"#ff50ff\",\"#ff65ff\",\"#ff16ff\",\"#ff08ff\",\"#ff04ff\",\"#ffa6ff\",\"#ff17ff\",\"#ff32ff\",\"#ff37ff\",\"#ff24ff\",\"#ffbbff\",\"#ff16ff\",\"#ff50ff\",\"#ff06ff\",\"#ff38ff\",\"#ff0fff\",\"#ff5fff\",\"#ff9fff\",\"#ff80ff\",\"#ffdcff\",\"#ff7fff\",\"#ffb9ff\",\"#ffe8ff\",\"#ffd9ff\",\"#ff09ff\",\"#ff34ff\",\"#ff59ff\",\"#ff20ff\",\"#ff59ff\",\"#ffdeff\",\"#ff30ff\",\"#ffbbff\",\"#ff4aff\",\"#ff6bff\",\"#ffeaff\",\"#ff23ff\",\"#fff1ff\",\"#ff93ff\",\"#ff99ff\",\"#ff79ff\",\"#ffefff\",\"#ff05ff\",\"#ffb9ff\",\"#ff7dff\",\"#ff17ff\",\"#ff3bff\",\"#ffc3ff\",\"#ff94ff\",\"#ff52ff\",\"#ff3dff\",\"#ff33ff\",\"#ffeeff\",\"#ff4cff\",\"#ffdaff\",\"#ff7bff\",\"#ff49ff\",\"#ffc4ff\",\"#ff8cff\",\"#ff4eff\",\"#ff09ff\",\"#ffc3ff\",\"#ff7cff\",\"#ffd9ff\",\"#ff1fff\",\"#ff67ff\",\"#ffb8ff\",\"#ff66ff\",\"#ffe1ff\",\"#ffccff\",\"#ff39ff\",\"#ffbeff\",\"#ff92ff\",\"#ffd6ff\",\"#ff8cff\",\"#ffb7ff\",\"#ff6eff\",\"#fff5ff\",\"#ff02ff\",\"#ffe0ff\",\"#ff53ff\",\"#ff34ff\",\"#ffcbff\",\"#ff7eff\",\"#ffc8ff\",\"#ff2eff\",\"#ff58ff\",\"#ff1bff\",\"#ff28ff\",\"#ff4dff\",\"#ff39ff\",\"#ff70ff\",\"#ffb8ff\",\"#ff24ff\",\"#ffecff\",\"#ff0fff\",\"#ff3aff\",\"#ff29ff\",\"#ffbbff\",\"#ff12ff\",\"#ff88ff\",\"#ffbbff\",\"#ffaeff\",\"#ffaaff\",\"#ff95ff\",\"#fffaff\",\"#ff54ff\",\"#ff1cff\",\"#ff1fff\",\"#ff96ff\",\"#ff1cff\",\"#ff66ff\",\"#ffb2ff\",\"#ff43ff\",\"#ff89ff\",\"#ffe8ff\",\"#ff74ff\",\"#ffeaff\",\"#ff73ff\",\"#ffe3ff\",\"#ff87ff\",\"#ffbdff\",\"#ff92ff\",\"#ffbcff\",\"#ff2eff\",\"#ffa5ff\",\"#ff5cff\",\"#ff21ff\",\"#ff0fff\",\"#ff50ff\",\"#ff18ff\",\"#ffa9ff\",\"#fff9ff\",\"#fff1ff\",\"#ff37ff\",\"#ff73ff\",\"#ff1dff\",\"#ff25ff\",\"#ff68ff\",\"#ff05ff\",\"#ff02ff\",\"#ff0eff\",\"#fffcff\",\"#ff3bff\",\"#ffc1ff\",\"#ff94ff\",\"#ff9dff\",\"#ff0aff\",\"#ffc5ff\",\"#ffb1ff\",\"#ff85ff\",\"#ffcdff\",\"#ff9cff\",\"#ffb0ff\",\"#ff3fff\",\"#ff91ff\",\"#ffcaff\",\"#ffa0ff\",\"#ff55ff\",\"#ff72ff\",\"#ff86ff\",\"#ffa0ff\",\"#ffdeff\",\"#ffe6ff\",\"#ff23ff\",\"#ff19ff\",\"#ff1fff\",\"#ffe8ff\",\"#ffcfff\",\"#ff9eff\",\"#ff55ff\",\"#ffbcff\",\"#ff13ff\",\"#ff03ff\",\"#ff7cff\",\"#ff0dff\",\"#ff7bff\",\"#ff3eff\",\"#ff9dff\",\"#ff5eff\",\"#ff68ff\",\"#ff85ff\",\"#ff12ff\",\"#ff64ff\",\"#ffa2ff\",\"#ff91ff\",\"#ffbaff\",\"#ff9bff\",\"#ff8bff\",\"#ffddff\",\"#ff3eff\",\"#ff96ff\",\"#ff07ff\",\"#ffa8ff\",\"#ffa5ff\",\"#ff6dff\",\"#ff2fff\",\"#ff36ff\",\"#ffc2ff\",\"#ff68ff\",\"#ffc8ff\",\"#ff7bff\",\"#ff33ff\",\"#ffc8ff\",\"#ff49ff\",\"#ff29ff\",\"#ff88ff\",\"#ff4cff\",\"#ff3bff\",\"#ff1cff\",\"#ff06ff\",\"#ffd7ff\",\"#ff2eff\",\"#ffe5ff\",\"#ff1fff\",\"#ff46ff\",\"#ffb1ff\",\"#ffafff\",\"#ffd7ff\",\"#ffbaff\",\"#ff52ff\",\"#ffccff\",\"#ff91ff\",\"#fff0ff\",\"#ff19ff\",\"#ff42ff\",\"#ffcaff\",\"#ffa8ff\",\"#ffdfff\",\"#fff2ff\",\"#ffefff\",\"#ffdaff\",\"#ff96ff\",\"#ff2aff\",\"#ff46ff\",\"#ffbaff\",\"#ffa8ff\",\"#ffbaff\",\"#ff10ff\",\"#ff86ff\",\"#ffe5ff\",\"#ffd6ff\",\"#ff6dff\",\"#ff46ff\",\"#ff6aff\",\"#ffa2ff\",\"#ff93ff\",\"#ff14ff\",\"#ff61ff\",\"#ffbaff\",\"#ffccff\",\"#ffa8ff\",\"#ffceff\",\"#ff96ff\",\"#ff5eff\",\"#ff74ff\",\"#ff7eff\",\"#ff4cff\",\"#ffa4ff\",\"#ffdbff\",\"#ff5bff\",\"#ff1cff\",\"#ff50ff\",\"#ffa2ff\",\"#ff53ff\",\"#ff37ff\",\"#ffddff\",\"#ffbfff\",\"#ff2eff\",\"#ff07ff\",\"#ff2eff\",\"#ff22ff\",\"#ff9fff\",\"#ff4eff\",\"#ffa8ff\",\"#ff6bff\",\"#ffa6ff\",\"#ff4aff\",\"#ffd5ff\",\"#ff73ff\",\"#ff6eff\",\"#ffaaff\",\"#ff84ff\",\"#ff33ff\",\"#ff30ff\",\"#ffbbff\",\"#ffc6ff\",\"#ff9bff\",\"#ffe7ff\",\"#ffaaff\",\"#ffd7ff\",\"#ffc6ff\",\"#fff8ff\",\"#ffd3ff\",\"#ff7eff\",\"#ffdcff\",\"#ff2eff\",\"#ffbaff\",\"#ff0dff\",\"#ff7bff\",\"#fff6ff\",\"#ff22ff\",\"#ff20ff\",\"#ffe5ff\",\"#fffaff\",\"#ff58ff\",\"#ff23ff\",\"#ff7bff\",\"#ff6aff\",\"#ff98ff\",\"#ff06ff\",\"#ffdeff\",\"#ffc2ff\",\"#ff36ff\",\"#ff1fff\",\"#fffaff\",\"#ffb2ff\",\"#ffbdff\",\"#ffcdff\",\"#ffb1ff\",\"#ffedff\",\"#ff04ff\",\"#ff42ff\",\"#ff72ff\",\"#ff34ff\",\"#ffc1ff\",\"#ff06ff\",\"#ff04ff\",\"#ff49ff\",\"#ff02ff\",\"#ffd4ff\",\"#ff2dff\",\"#ff89ff\",\"#ff2bff\",\"#ff38ff\",\"#ffedff\",\"#ff50ff\",\"#ff8cff\",\"#ff43ff\",\"#ff7bff\",\"#ffbfff\",\"#ff50ff\",\"#ff9bff\",\"#ffc4ff\",\"#ff2dff\",\"#ff68ff\",\"#ff2dff\",\"#ff82ff\",\"#ff33ff\",\"#ffeeff\",\"#ffa2ff\",\"#ff01ff\",\"#ff5cff\",\"#ffc2ff\",\"#ffa0ff\",\"#ff42ff\",\"#ff05ff\",\"#ff72ff\",\"#ffcdff\",\"#ffc7ff\",\"#fff2ff\",\"#ff94ff\",\"#ff0fff\",\"#ffa9ff\",\"#ff89ff\",\"#ffc8ff\",\"#ff0aff\",\"#ff2fff\",\"#ffb4ff\",\"#ffe8ff\",\"#ffb9ff\",\"#ff99ff\",\"#ff38ff\",\"#ffcaff\",\"#ff13ff\",\"#ffadff\",\"#ffc9ff\",\"#ffa0ff\",\"#ff66ff\",\"#ffeaff\",\"#ff4fff\",\"#ff17ff\",\"#ff82ff\",\"#ff5dff\",\"#ff76ff\",\"#ffb7ff\",\"#ff53ff\",\"#ffb8ff\",\"#ff22ff\",\"#ff1aff\",\"#ff63ff\",\"#ff60ff\",\"#ff46ff\",\"#ffa4ff\",\"#ff7dff\",\"#ff06ff\",\"#ff7cff\",\"#ffacff\",\"#ff5cff\",\"#ff50ff\",\"#ff88ff\",\"#ffacff\",\"#ff3cff\",\"#ffb4ff\",\"#ff44ff\",\"#ff91ff\",\"#ff01ff\",\"#ffeaff\",\"#ff70ff\",\"#ffafff\",\"#ffedff\",\"#ff6cff\",\"#ffa7ff\",\"#ffd7ff\",\"#ff18ff\",\"#ff43ff\",\"#ff24ff\",\"#ff09ff\",\"#fffbff\",\"#ffe9ff\",\"#ffcbff\",\"#ff9cff\",\"#ffa6ff\",\"#ffe9ff\",\"#ffd3ff\",\"#ff64ff\",\"#ff68ff\",\"#ff1eff\",\"#ff04ff\",\"#ff5bff\",\"#ff9bff\",\"#ff7bff\",\"#ff02ff\",\"#ff7dff\",\"#ff06ff\",\"#ffb4ff\",\"#ffe1ff\",\"#ff53ff\",\"#ffaaff\",\"#ff78ff\",\"#ff46ff\",\"#ff84ff\",\"#ff5eff\",\"#ff40ff\",\"#ff98ff\",\"#ff5dff\",\"#ff05ff\",\"#ffbcff\",\"#ff89ff\",\"#ffc5ff\",\"#ff20ff\",\"#ff76ff\",\"#ff9aff\",\"#ff35ff\",\"#fff2ff\",\"#ff63ff\",\"#ff2fff\",\"#ff95ff\",\"#ffe3ff\",\"#ffa8ff\",\"#ff67ff\",\"#ff06ff\",\"#ff9dff\",\"#ff48ff\",\"#ff18ff\",\"#ff03ff\",\"#ff2eff\",\"#ff5bff\",\"#ffa2ff\",\"#ffd9ff\",\"#ff89ff\",\"#ffe1ff\",\"#ff50ff\",\"#ffc5ff\",\"#ff9aff\",\"#ff74ff\",\"#ff89ff\",\"#ff60ff\",\"#ff67ff\",\"#fffcff\",\"#ff65ff\",\"#ffd5ff\",\"#ff28ff\",\"#ff13ff\",\"#ff19ff\",\"#ff6eff\",\"#ff5aff\",\"#ff3cff\",\"#ffdfff\",\"#ff25ff\",\"#ff0aff\",\"#ff6cff\",\"#ff97ff\",\"#ff10ff\",\"#ffc8ff\",\"#ffb6ff\",\"#ffa7ff\",\"#ff0dff\",\"#ff35ff\",\"#ff79ff\",\"#ff55ff\",\"#ff58ff\",\"#ffa5ff\",\"#ff4fff\",\"#ff22ff\",\"#ff76ff\",\"#ff2dff\",\"#ff30ff\",\"#ffeeff\",\"#ff58ff\",\"#ffd5ff\",\"#ff9bff\",\"#ff14ff\",\"#ff04ff\",\"#ff8dff\",\"#ffd3ff\",\"#ff7cff\",\"#ff07ff\",\"#ff57ff\",\"#ff0cff\",\"#ff30ff\",\"#ff87ff\",\"#ff50ff\",\"#ffb8ff\",\"#ff64ff\",\"#ffaeff\",\"#ff4aff\",\"#ff24ff\",\"#ff77ff\",\"#ffadff\",\"#ffcdff\",\"#fffbff\",\"#ffcfff\",\"#fff4ff\",\"#ffd8ff\",\"#ff47ff\",\"#ff87ff\",\"#ff78ff\",\"#ff40ff\",\"#ffe5ff\",\"#fffdff\",\"#ff4aff\",\"#fff8ff\",\"#ff9dff\",\"#ff99ff\",\"#ffecff\",\"#ffccff\",\"#ff3bff\",\"#fff6ff\",\"#ff71ff\",\"#ffd9ff\",\"#ff22ff\",\"#ffd7ff\",\"#ffdcff\",\"#ff46ff\",\"#ffa9ff\",\"#ff00ff\",\"#ff38ff\",\"#ff3eff\",\"#ffd5ff\",\"#ffb5ff\",\"#ff2dff\",\"#ffecff\",\"#ffddff\",\"#ff1eff\",\"#ff5eff\",\"#ff4cff\",\"#ff5dff\",\"#ff57ff\",\"#ffe0ff\",\"#ff90ff\",\"#ffb9ff\",\"#ff5aff\",\"#ff7cff\",\"#ff4cff\",\"#ffc5ff\",\"#ff13ff\",\"#ff55ff\",\"#ff85ff\",\"#ff4bff\",\"#ffe0ff\",\"#ff2dff\",\"#ff29ff\",\"#ffd4ff\",\"#ffb1ff\",\"#ff36ff\",\"#ff3fff\",\"#ffcaff\",\"#ff5cff\",\"#ffe5ff\",\"#ff71ff\",\"#ff72ff\",\"#ff38ff\",\"#ff04ff\",\"#ff9fff\",\"#ffefff\",\"#ffafff\",\"#fffdff\",\"#ff98ff\",\"#ff63ff\",\"#ff7aff\",\"#ffc8ff\",\"#ffc8ff\",\"#ff59ff\",\"#ffbaff\",\"#ff79ff\",\"#fff3ff\",\"#ff27ff\",\"#ffe4ff\",\"#ff19ff\",\"#ff26ff\",\"#ff7cff\",\"#ffe3ff\",\"#fffeff\",\"#ff0fff\",\"#ff19ff\",\"#ffa4ff\",\"#ffd9ff\",\"#ffd3ff\",\"#ff27ff\",\"#ffb8ff\",\"#ff9fff\",\"#ff2eff\",\"#ff1aff\",\"#ff05ff\",\"#ff0cff\",\"#ffb7ff\",\"#ff95ff\",\"#ff18ff\",\"#ffd9ff\",\"#ff38ff\",\"#ff64ff\",\"#ff84ff\",\"#ff44ff\",\"#ff6aff\",\"#ff17ff\",\"#ffd1ff\",\"#ffc1ff\",\"#ff4aff\",\"#ff81ff\",\"#ff87ff\",\"#fff3ff\",\"#fffdff\",\"#ffbfff\",\"#ff77ff\",\"#ff94ff\",\"#ffdcff\",\"#ff58ff\",\"#ff8cff\",\"#ffe9ff\",\"#ff83ff\",\"#ff97ff\",\"#ff20ff\",\"#ff36ff\",\"#fff1ff\",\"#ffadff\",\"#ff73ff\",\"#ff96ff\",\"#ff71ff\",\"#ff16ff\",\"#ff06ff\",\"#ff4fff\",\"#ffd3ff\",\"#ff59ff\",\"#ff85ff\",\"#ff68ff\",\"#ffb4ff\",\"#ff53ff\",\"#ff1fff\",\"#ff29ff\",\"#ff79ff\",\"#ff11ff\",\"#ff6cff\",\"#ffe3ff\",\"#ffd8ff\",\"#ff93ff\",\"#ff52ff\",\"#ff5cff\",\"#ff2eff\",\"#ff0cff\",\"#ff53ff\",\"#ff67ff\",\"#ff23ff\",\"#ffb0ff\",\"#ff75ff\",\"#ffbfff\",\"#ffdcff\",\"#ffd5ff\",\"#fff5ff\",\"#ff5bff\",\"#ff0bff\",\"#ff29ff\",\"#fffcff\",\"#ffd7ff\",\"#ff4dff\",\"#ff36ff\",\"#ffd3ff\",\"#ff49ff\",\"#ffb8ff\",\"#ff9aff\",\"#ffc6ff\",\"#ff58ff\",\"#ff68ff\",\"#fffdff\",\"#ff8dff\",\"#ff89ff\",\"#ff78ff\",\"#ffe9ff\",\"#ff28ff\",\"#ff71ff\",\"#ffaaff\",\"#ffc0ff\",\"#ffe8ff\",\"#ff99ff\",\"#ffcbff\",\"#ff1bff\",\"#ffdcff\",\"#ff6bff\",\"#ffcbff\",\"#ffefff\",\"#fffbff\",\"#ffa2ff\",\"#ff1fff\",\"#ff2cff\",\"#ffafff\",\"#fff6ff\",\"#ffb0ff\",\"#ffafff\",\"#ff9bff\",\"#ffc7ff\",\"#ff2fff\",\"#ff26ff\",\"#ff71ff\",\"#ff35ff\",\"#ff82ff\",\"#ffe9ff\",\"#ff95ff\",\"#ff9aff\",\"#ff44ff\",\"#ff10ff\",\"#ffc5ff\",\"#ff13ff\",\"#ff96ff\",\"#ff67ff\",\"#ff1aff\",\"#ffb3ff\",\"#ffafff\",\"#fffaff\",\"#ffc5ff\",\"#ff91ff\",\"#ff2bff\",\"#ffebff\",\"#ffe9ff\",\"#ff2aff\",\"#fff1ff\",\"#ff61ff\",\"#ff03ff\",\"#fff9ff\",\"#ff2bff\",\"#ff12ff\",\"#ff84ff\",\"#ff84ff\",\"#ffd7ff\",\"#ffe5ff\",\"#ff65ff\",\"#ff5cff\",\"#ffcaff\",\"#ffe2ff\",\"#ff1bff\",\"#ff6eff\",\"#ff92ff\",\"#fffdff\",\"#ffd9ff\",\"#ff5fff\",\"#ff28ff\",\"#ff3fff\",\"#ff22ff\",\"#ff36ff\",\"#ff20ff\",\"#ff3aff\",\"#ff8bff\",\"#ff8eff\",\"#ff5fff\",\"#ff94ff\",\"#ff5aff\",\"#ff85ff\",\"#ff83ff\",\"#ffe8ff\",\"#ffa2ff\",\"#ffa3ff\",\"#ff7fff\",\"#ffd1ff\",\"#ff8fff\",\"#ff00ff\",\"#ffc6ff\",\"#ffccff\",\"#ffdaff\",\"#fffaff\",\"#fffbff\",\"#ff65ff\",\"#ff61ff\",\"#ffd1ff\",\"#ff90ff\",\"#ffefff\",\"#ffbaff\",\"#ffa7ff\",\"#ff12ff\",\"#ffd3ff\",\"#ff53ff\",\"#ffabff\",\"#fff3ff\",\"#ff87ff\",\"#fff2ff\",\"#ff81ff\",\"#ff14ff\",\"#ff51ff\",\"#ff54ff\",\"#ff42ff\",\"#ffe1ff\",\"#ffecff\",\"#ff73ff\",\"#ff47ff\",\"#ff00ff\",\"#ff27ff\",\"#ff8cff\",\"#ff7eff\",\"#ffecff\",\"#ff3dff\",\"#ff99ff\",\"#ffb5ff\",\"#ff96ff\",\"#ffedff\",\"#ff55ff\",\"#ff66ff\",\"#ff1eff\",\"#ff56ff\",\"#ffc8ff\",\"#ffa7ff\",\"#ff84ff\",\"#fff7ff\",\"#ffb4ff\",\"#ff84ff\",\"#ff99ff\",\"#ff50ff\",\"#ff1cff\",\"#ff03ff\",\"#ff5cff\",\"#ff68ff\",\"#ff52ff\",\"#ff22ff\",\"#ff3bff\",\"#ffe8ff\",\"#ff37ff\",\"#ffaeff\",\"#ff45ff\",\"#ff56ff\",\"#ff02ff\",\"#ff5dff\",\"#ff94ff\",\"#fffdff\",\"#ffe2ff\",\"#ff7fff\",\"#ff6dff\",\"#fffcff\",\"#ff6eff\",\"#ff01ff\",\"#ffd2ff\",\"#ff8eff\",\"#ff89ff\",\"#ffe2ff\",\"#ff24ff\",\"#ffa0ff\",\"#ff7fff\",\"#ff87ff\",\"#ffc4ff\",\"#ffddff\",\"#ffdbff\",\"#ff0eff\",\"#ff8bff\",\"#ff32ff\",\"#ffc3ff\",\"#ff67ff\",\"#fff2ff\",\"#ff94ff\",\"#ffe7ff\",\"#ff01ff\",\"#ffa4ff\",\"#ff2bff\",\"#ffa0ff\",\"#ffb6ff\",\"#ffdcff\",\"#ff9aff\",\"#ff55ff\",\"#ff30ff\",\"#ffabff\",\"#ff30ff\",\"#ff59ff\",\"#ffa4ff\",\"#ff66ff\",\"#ff85ff\",\"#ff1aff\",\"#ffebff\",\"#ffc1ff\",\"#ff51ff\",\"#ff2fff\",\"#ff3bff\",\"#fffcff\",\"#ffafff\",\"#ffbeff\",\"#fffaff\",\"#ffe9ff\",\"#ff23ff\",\"#ffd2ff\",\"#ffd0ff\",\"#ff9cff\",\"#ff4aff\",\"#ffd4ff\",\"#ff8dff\",\"#ff49ff\",\"#ffb3ff\",\"#ff6cff\",\"#ff33ff\",\"#ff62ff\",\"#ff0aff\",\"#fff5ff\",\"#ff4aff\"],\"radius\":{\"__ndarray__\":\"pYKyGSN49j+mJIs2hQzlPzePyZMjmvQ/WExG0Wua/T96UpEu3Sz0P8x6twgpY/Y/5exmwtv1/z/piSEy9Ij6P+lDAoY/svA/cWUJpmg9/T+sQ3ivjkHgP0hsesMvE8Y/bBwS188x5j9EPHHDs6LcPza4ZYW2Sew/o/AmxEbv6D9qOreTKCv9PwCNOCQ915Q/LZe+uhsF+D9ArCR6sCGdPxhsNrT2C/0/IL9joMT8oT/HGiuP9wn0Px9mFrW9+PE/NqP4Qyvv/D949B1IPovoP4paah50Hes/1jjFo+Ad7z/DkxyvbID2P4WHytWjivY/qu2EWk8m5D/LmYv+9e3wP4OYKp+BLfQ/rTGvK97g+D9vcWJUbJ/2P+gUSOA2meI/I4/refpn7j+aGni/+rnxPzgk+fgyueo/+I2/+Q7z8D/jnSjFP7ruPxEr4urGxfc/KTjIic6e+D/88sZUyhLY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9lopUQGGsR2Nm7ktAP7Ss8zvfSkD8DOmkNTFWQNo0qz35IyxAZgr/QDpKT0D6Z0kyd+xIQKzVuvmGfUpAQiCTzBctU0AQBNXhHLdVQDbvK5EygVVA53b6GotkFUB1I5Eb3i9LQGmEVCiaejNAxt+4kCooU0D4tztPFDxEQHaOiV+St1dAUDZ85pkBTUC0uAUVoZlWQBBEEfph3do/4wxu84wTUED2/oOBubkwQFrIkZkeR09Av6XXir/OUUBu2OEM/YVVQIzZ3ocaK05AvmfLURq8QECuak69mssyQBeV3ro1zVBA3WGa0qfLMkAaYKAv3WBBQE4rM0ZcGFBAw/sdQLXsQ0DUysS0fSJKQACg/iyWZyRAcZQvtE4VV0C+MlFsFO9SQBpUhR1G4T9An6SJ6Sl9MkAcFtXgfhE3QN6VjLd3vVhAzN8SGP8jUUB90/xiTqdSQE6Drf/FelhAVp426T3YVkCp/6QZtHwrQLQxegn5mFRAevl2ZhpwVEA496Moop9OQDRMrIEkAD1AQ1d1j27UVEC398TLNK5LQISqnLGbbzxABbeI6heRUUA+zM/KeTRFQL4I3V37BTRAkPLp7hUzQ0DikceI93oOQCwj6dbwC1hADt6GXOTvPEA=\",\"dtype\":\"float64\",\"order\":\"little\",\"shape\":[1000]}},\"selected\":{\"id\":\"10955\"},\"selection_policy\":{\"id\":\"10954\"}},\"id\":\"10690\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"10949\",\"type\":\"BasicTickFormatter\"}],\"root_ids\":[\"10657\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"43dc04cb-2dec-4b43-9c5a-ffac9bfaa746\",\"root_ids\":[\"10657\"],\"roots\":{\"10657\":\"15ceed9c-f3b8-43f8-9de1-0ff0922c24a5\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "10657"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import numpy as np\n",
    "\n",
    "# generate some data\n",
    "N = 1000\n",
    "x = np.random.random(size=N) * 100\n",
    "y = np.random.random(size=N) * 100\n",
    "\n",
    "# generate radii and colors based on data\n",
    "radii = y / 100 * 2\n",
    "colors = [\"#%02x%02x%02x\" % (255, int(round(value * 255 / 100)), 255) for value in y]\n",
    "\n",
    "# create a new plot with a specific size\n",
    "p = figure(\n",
    "    title=\"Vectorized colors and radii example\",\n",
    "    sizing_mode=\"stretch_width\",\n",
    "    max_width=500,\n",
    "    height=250,\n",
    ")\n",
    "\n",
    "# add circle renderer\n",
    "p.circle(\n",
    "    x,\n",
    "    y,\n",
    "    radius=radii,\n",
    "    fill_color=colors,\n",
    "    fill_alpha=0.6,\n",
    "    line_color=\"lightgrey\",\n",
    ")\n",
    "\n",
    "# show the results\n",
    "show(p)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "2f8f29ab-5bb9-4308-94ac-7ba1eebab098",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:52:27.914122Z",
     "iopub.status.busy": "2022-10-21T00:52:27.913547Z",
     "iopub.status.idle": "2022-10-21T00:52:28.080127Z",
     "shell.execute_reply": "2022-10-21T00:52:28.079666Z",
     "shell.execute_reply.started": "2022-10-21T00:52:27.914073Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"b2b4c89c-b88a-4b21-a49c-c939f6d49e4e\" data-root-id=\"11149\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"e011e6a5-faaf-4aca-9e28-a28681903dbb\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"below\":[{\"id\":\"11158\"}],\"center\":[{\"id\":\"11161\"},{\"id\":\"11165\"}],\"height\":250,\"left\":[{\"id\":\"11162\"}],\"renderers\":[{\"id\":\"11184\"}],\"title\":{\"id\":\"11447\"},\"toolbar\":{\"id\":\"11173\"},\"width\":500,\"x_range\":{\"id\":\"11150\"},\"x_scale\":{\"id\":\"11154\"},\"y_range\":{\"id\":\"11152\"},\"y_scale\":{\"id\":\"11156\"}},\"id\":\"11149\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"axis\":{\"id\":\"11158\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"11161\",\"type\":\"Grid\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"11172\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"11180\"},\"glyph\":{\"id\":\"11181\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"11183\"},\"nonselection_glyph\":{\"id\":\"11182\"},\"view\":{\"id\":\"11185\"}},\"id\":\"11184\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"data\":{\"x\":[-32,-31,-30,-29,-28,-27,-26,-25,-24,-23,-22,-21,-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],\"y\":[1024,961,900,841,784,729,676,625,576,529,484,441,400,361,324,289,256,225,196,169,144,121,100,81,64,49,36,25,16,9,4,1,0,1,4,9,16,25,36,49,64,81,100,121,144,169,196,225,256,289,324,361,400,441,484,529,576,625,676,729,784,841,900,961,1024]},\"selected\":{\"id\":\"11456\"},\"selection_policy\":{\"id\":\"11455\"}},\"id\":\"11180\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"11170\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"11169\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"11156\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"11163\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"11455\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis\":{\"id\":\"11162\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"11165\",\"type\":\"Grid\"},{\"attributes\":{\"high\":1024,\"low\":0,\"palette\":[\"#30123b\",\"#311542\",\"#32184a\",\"#341b51\",\"#351e58\",\"#36215f\",\"#372365\",\"#38266c\",\"#392972\",\"#3a2c79\",\"#3b2f7f\",\"#3c3285\",\"#3c358b\",\"#3d3791\",\"#3e3a96\",\"#3f3d9c\",\"#4040a1\",\"#4043a6\",\"#4145ab\",\"#4148b0\",\"#424bb5\",\"#434eba\",\"#4350be\",\"#4353c2\",\"#4456c7\",\"#4458cb\",\"#455bce\",\"#455ed2\",\"#4560d6\",\"#4563d9\",\"#4666dd\",\"#4668e0\",\"#466be3\",\"#466de6\",\"#4670e8\",\"#4673eb\",\"#4675ed\",\"#4678f0\",\"#467af2\",\"#467df4\",\"#467ff6\",\"#4682f8\",\"#4584f9\",\"#4587fb\",\"#4589fc\",\"#448cfd\",\"#438efd\",\"#4291fe\",\"#4193fe\",\"#4096fe\",\"#3f98fe\",\"#3e9bfe\",\"#3c9dfd\",\"#3ba0fc\",\"#39a2fc\",\"#38a5fb\",\"#36a8f9\",\"#34aaf8\",\"#33acf6\",\"#31aff5\",\"#2fb1f3\",\"#2db4f1\",\"#2bb6ef\",\"#2ab9ed\",\"#28bbeb\",\"#26bde9\",\"#25c0e6\",\"#23c2e4\",\"#21c4e1\",\"#20c6df\",\"#1ec9dc\",\"#1dcbda\",\"#1ccdd7\",\"#1bcfd4\",\"#1ad1d2\",\"#19d3cf\",\"#18d5cc\",\"#18d7ca\",\"#17d9c7\",\"#17dac4\",\"#17dcc2\",\"#17debf\",\"#18e0bd\",\"#18e1ba\",\"#19e3b8\",\"#1ae4b6\",\"#1be5b4\",\"#1de7b1\",\"#1ee8af\",\"#20e9ac\",\"#22eba9\",\"#24eca6\",\"#27eda3\",\"#29eea0\",\"#2cef9d\",\"#2ff09a\",\"#32f197\",\"#35f394\",\"#38f491\",\"#3bf48d\",\"#3ff58a\",\"#42f687\",\"#46f783\",\"#4af880\",\"#4df97c\",\"#51f979\",\"#55fa76\",\"#59fb72\",\"#5dfb6f\",\"#61fc6c\",\"#65fc68\",\"#69fd65\",\"#6dfd62\",\"#71fd5f\",\"#74fe5c\",\"#78fe59\",\"#7cfe56\",\"#80fe53\",\"#84fe50\",\"#87fe4d\",\"#8bfe4b\",\"#8efe48\",\"#92fe46\",\"#95fe44\",\"#98fe42\",\"#9bfd40\",\"#9efd3e\",\"#a1fc3d\",\"#a4fc3b\",\"#a6fb3a\",\"#a9fb39\",\"#acfa37\",\"#aef937\",\"#b1f836\",\"#b3f835\",\"#b6f735\",\"#b9f534\",\"#bbf434\",\"#bef334\",\"#c0f233\",\"#c3f133\",\"#c5ef33\",\"#c8ee33\",\"#caed33\",\"#cdeb34\",\"#cfea34\",\"#d1e834\",\"#d4e735\",\"#d6e535\",\"#d8e335\",\"#dae236\",\"#dde036\",\"#dfde36\",\"#e1dc37\",\"#e3da37\",\"#e5d838\",\"#e7d738\",\"#e8d538\",\"#ead339\",\"#ecd139\",\"#edcf39\",\"#efcd39\",\"#f0cb3a\",\"#f2c83a\",\"#f3c63a\",\"#f4c43a\",\"#f6c23a\",\"#f7c039\",\"#f8be39\",\"#f9bc39\",\"#f9ba38\",\"#fab737\",\"#fbb537\",\"#fbb336\",\"#fcb035\",\"#fcae34\",\"#fdab33\",\"#fda932\",\"#fda631\",\"#fda330\",\"#fea12f\",\"#fe9e2e\",\"#fe9b2d\",\"#fe982c\",\"#fd952b\",\"#fd9229\",\"#fd8f28\",\"#fd8c27\",\"#fc8926\",\"#fc8624\",\"#fb8323\",\"#fb8022\",\"#fa7d20\",\"#fa7a1f\",\"#f9771e\",\"#f8741c\",\"#f7711b\",\"#f76e1a\",\"#f66b18\",\"#f56817\",\"#f46516\",\"#f36315\",\"#f26014\",\"#f15d13\",\"#ef5a11\",\"#ee5810\",\"#ed550f\",\"#ec520e\",\"#ea500d\",\"#e94d0d\",\"#e84b0c\",\"#e6490b\",\"#e5460a\",\"#e3440a\",\"#e24209\",\"#e04008\",\"#de3e08\",\"#dd3c07\",\"#db3a07\",\"#d93806\",\"#d73606\",\"#d63405\",\"#d43205\",\"#d23005\",\"#d02f04\",\"#ce2d04\",\"#cb2b03\",\"#c92903\",\"#c72803\",\"#c52602\",\"#c32402\",\"#c02302\",\"#be2102\",\"#bb1f01\",\"#b91e01\",\"#b61c01\",\"#b41b01\",\"#b11901\",\"#ae1801\",\"#ac1601\",\"#a91501\",\"#a61401\",\"#a31201\",\"#a01101\",\"#9d1001\",\"#9a0e01\",\"#970d01\",\"#940c01\",\"#910b01\",\"#8e0a01\",\"#8b0901\",\"#870801\",\"#840701\",\"#810602\",\"#7d0502\",\"#7a0402\"]},\"id\":\"11148\",\"type\":\"LinearColorMapper\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"field\":\"y\",\"transform\":{\"id\":\"11148\"}},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"field\":\"y\",\"transform\":{\"id\":\"11148\"}},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"field\":\"y\",\"transform\":{\"id\":\"11148\"}},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"11183\",\"type\":\"Circle\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"field\":\"y\",\"transform\":{\"id\":\"11148\"}},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"field\":\"y\",\"transform\":{\"id\":\"11148\"}},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"field\":\"y\",\"transform\":{\"id\":\"11148\"}},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"11182\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"11180\"}},\"id\":\"11185\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"11171\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"11454\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"11152\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"11150\",\"type\":\"DataRange1d\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"11450\"},\"group\":null,\"major_label_policy\":{\"id\":\"11451\"},\"ticker\":{\"id\":\"11163\"}},\"id\":\"11162\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"11453\"},\"group\":null,\"major_label_policy\":{\"id\":\"11454\"},\"ticker\":{\"id\":\"11159\"}},\"id\":\"11158\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"11453\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"11154\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_color\":{\"field\":\"y\",\"transform\":{\"id\":\"11148\"}},\"hatch_color\":{\"field\":\"y\",\"transform\":{\"id\":\"11148\"}},\"line_color\":{\"field\":\"y\",\"transform\":{\"id\":\"11148\"}},\"size\":{\"value\":10},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"11181\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"11450\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"11167\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"11159\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"11166\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"11451\",\"type\":\"AllLabels\"},{\"attributes\":{\"overlay\":{\"id\":\"11172\"}},\"id\":\"11168\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"tools\":[{\"id\":\"11166\"},{\"id\":\"11167\"},{\"id\":\"11168\"},{\"id\":\"11169\"},{\"id\":\"11170\"},{\"id\":\"11171\"}]},\"id\":\"11173\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"11456\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"11447\",\"type\":\"Title\"}],\"root_ids\":[\"11149\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"e011e6a5-faaf-4aca-9e28-a28681903dbb\",\"root_ids\":[\"11149\"],\"roots\":{\"11149\":\"b2b4c89c-b88a-4b21-a49c-c939f6d49e4e\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "11149"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from bokeh.palettes import Turbo256\n",
    "from bokeh.transform import linear_cmap\n",
    "\n",
    "# generate data\n",
    "x = list(range(-32, 33))\n",
    "y = [i**2 for i in x]\n",
    "\n",
    "# create linear color mapper\n",
    "mapper = linear_cmap(field_name=\"y\", palette=Turbo256, low=min(y), high=max(y))\n",
    "\n",
    "# create plot\n",
    "p = figure(width=500, height=250)\n",
    "\n",
    "# create circle renderer with color mapper\n",
    "p.circle(x, y, color=mapper, size=10)\n",
    "\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3b5e524c-3df7-422e-84ca-ef153ed6536d",
   "metadata": {},
   "source": [
    "# 组合图形"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "2e305271-206e-4ba9-a638-1e143a2fac31",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:53:22.577325Z",
     "iopub.status.busy": "2022-10-21T00:53:22.576755Z",
     "iopub.status.idle": "2022-10-21T00:53:22.873802Z",
     "shell.execute_reply": "2022-10-21T00:53:22.872894Z",
     "shell.execute_reply.started": "2022-10-21T00:53:22.577277Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"b36781a7-ce5a-4f06-ace0-b9aa43f950b0\" data-root-id=\"11779\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"027b1025-eb73-43a1-ac81-d6f5e4942136\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"11668\"},{\"id\":\"11705\"},{\"id\":\"11742\"}]},\"id\":\"11779\",\"type\":\"Row\"},{\"attributes\":{},\"id\":\"11756\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"11745\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis\":{\"id\":\"11755\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"11758\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#53777a\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"#53777a\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#53777a\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"11702\",\"type\":\"Circle\"},{\"attributes\":{\"source\":{\"id\":\"11699\"}},\"id\":\"11704\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0,1,2,3,4,5,6,7,8,9,10],\"y\":[5,4,3,2,1,0,1,2,3,4,5]},\"selected\":{\"id\":\"12083\"},\"selection_policy\":{\"id\":\"12082\"}},\"id\":\"11773\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"tools\":[{\"id\":\"11685\"},{\"id\":\"11686\"},{\"id\":\"11687\"},{\"id\":\"11688\"},{\"id\":\"11689\"},{\"id\":\"11690\"}]},\"id\":\"11692\",\"type\":\"Toolbar\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.8},\"fill_color\":{\"value\":\"#d95b43\"},\"hatch_alpha\":{\"value\":0.8},\"hatch_color\":{\"value\":\"#d95b43\"},\"line_alpha\":{\"value\":0.8},\"line_color\":{\"value\":\"#d95b43\"},\"marker\":{\"value\":\"square\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"11774\",\"type\":\"Scatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"11736\"},\"glyph\":{\"id\":\"11737\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"11739\"},\"nonselection_glyph\":{\"id\":\"11738\"},\"view\":{\"id\":\"11741\"}},\"id\":\"11740\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"11725\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"11743\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#d95b43\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"#d95b43\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#d95b43\"},\"marker\":{\"value\":\"square\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"11775\",\"type\":\"Scatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"11699\"},\"glyph\":{\"id\":\"11700\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"11702\"},\"nonselection_glyph\":{\"id\":\"11701\"},\"view\":{\"id\":\"11704\"}},\"id\":\"11703\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#53777a\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"#53777a\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#53777a\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"11701\",\"type\":\"Circle\"},{\"attributes\":{\"overlay\":{\"id\":\"11765\"}},\"id\":\"11761\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.8},\"fill_color\":{\"value\":\"#c02942\"},\"hatch_alpha\":{\"value\":0.8},\"hatch_color\":{\"value\":\"#c02942\"},\"line_alpha\":{\"value\":0.8},\"line_color\":{\"value\":\"#c02942\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"11737\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"12079\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"11762\",\"type\":\"SaveTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"11691\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"12080\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"11764\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"12062\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"11759\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"12063\",\"type\":\"AllLabels\"},{\"attributes\":{\"tools\":[{\"id\":\"11759\"},{\"id\":\"11760\"},{\"id\":\"11761\"},{\"id\":\"11762\"},{\"id\":\"11763\"},{\"id\":\"11764\"}]},\"id\":\"11766\",\"type\":\"Toolbar\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"12071\"},\"group\":null,\"major_label_policy\":{\"id\":\"12072\"},\"ticker\":{\"id\":\"11756\"}},\"id\":\"11755\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"12074\"},\"group\":null,\"major_label_policy\":{\"id\":\"12075\"},\"ticker\":{\"id\":\"11752\"}},\"id\":\"11751\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"11747\",\"type\":\"LinearScale\"},{\"attributes\":{\"background_fill_color\":\"#fafafa\",\"below\":[{\"id\":\"11714\"}],\"center\":[{\"id\":\"11717\"},{\"id\":\"11721\"}],\"height\":250,\"left\":[{\"id\":\"11718\"}],\"renderers\":[{\"id\":\"11740\"}],\"title\":{\"id\":\"12054\"},\"toolbar\":{\"id\":\"11729\"},\"width\":250,\"x_range\":{\"id\":\"11706\"},\"x_scale\":{\"id\":\"11710\"},\"y_range\":{\"id\":\"11708\"},\"y_scale\":{\"id\":\"11712\"}},\"id\":\"11705\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.8},\"fill_color\":{\"value\":\"#53777a\"},\"hatch_alpha\":{\"value\":0.8},\"hatch_color\":{\"value\":\"#53777a\"},\"line_alpha\":{\"value\":0.8},\"line_color\":{\"value\":\"#53777a\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"11700\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"11763\",\"type\":\"ResetTool\"},{\"attributes\":{\"data\":{\"x\":[0,1,2,3,4,5,6,7,8,9,10],\"y\":[0,1,2,3,4,5,6,7,8,9,10]},\"selected\":{\"id\":\"12077\"},\"selection_policy\":{\"id\":\"12076\"}},\"id\":\"11699\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"11669\",\"type\":\"DataRange1d\"},{\"attributes\":{\"data\":{\"x\":[0,1,2,3,4,5,6,7,8,9,10],\"y\":[10,9,8,7,6,5,4,3,2,1,0]},\"selected\":{\"id\":\"12080\"},\"selection_policy\":{\"id\":\"12079\"}},\"id\":\"11736\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"background_fill_color\":\"#fafafa\",\"below\":[{\"id\":\"11677\"}],\"center\":[{\"id\":\"11680\"},{\"id\":\"11684\"}],\"height\":250,\"left\":[{\"id\":\"11681\"}],\"renderers\":[{\"id\":\"11703\"}],\"title\":{\"id\":\"12052\"},\"toolbar\":{\"id\":\"11692\"},\"width\":250,\"x_range\":{\"id\":\"11669\"},\"x_scale\":{\"id\":\"11673\"},\"y_range\":{\"id\":\"11671\"},\"y_scale\":{\"id\":\"11675\"}},\"id\":\"11668\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"11671\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"11760\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"11675\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"12062\"},\"group\":null,\"major_label_policy\":{\"id\":\"12063\"},\"ticker\":{\"id\":\"11678\"}},\"id\":\"11677\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"12082\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"axis\":{\"id\":\"11681\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"11684\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"11752\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"11673\",\"type\":\"LinearScale\"},{\"attributes\":{\"axis\":{\"id\":\"11751\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"11754\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"11749\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"12083\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"11678\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"11677\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"11680\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"11682\",\"type\":\"BasicTicker\"},{\"attributes\":{\"source\":{\"id\":\"11736\"}},\"id\":\"11741\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"11690\",\"type\":\"HelpTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#c02942\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"#c02942\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#c02942\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"11739\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"11686\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"11685\",\"type\":\"PanTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"11765\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"12052\",\"type\":\"Title\"},{\"attributes\":{\"overlay\":{\"id\":\"11691\"}},\"id\":\"11687\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"11688\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"11689\",\"type\":\"ResetTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#d95b43\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"#d95b43\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#d95b43\"},\"marker\":{\"value\":\"square\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"11776\",\"type\":\"Scatter\"},{\"attributes\":{\"source\":{\"id\":\"11773\"}},\"id\":\"11778\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"12065\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"11773\"},\"glyph\":{\"id\":\"11774\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"11776\"},\"nonselection_glyph\":{\"id\":\"11775\"},\"view\":{\"id\":\"11778\"}},\"id\":\"11777\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"12066\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"12068\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"12054\",\"type\":\"Title\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"12056\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"12069\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"12060\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"12059\"},\"group\":null,\"major_label_policy\":{\"id\":\"12060\"},\"ticker\":{\"id\":\"11682\"}},\"id\":\"11681\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"11708\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"11715\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"11714\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"11717\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"11719\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"12071\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"axis\":{\"id\":\"11718\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"11721\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"12072\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"12068\"},\"group\":null,\"major_label_policy\":{\"id\":\"12069\"},\"ticker\":{\"id\":\"11715\"}},\"id\":\"11714\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"12074\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"11723\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"11728\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"12075\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#c02942\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"#c02942\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#c02942\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"11738\",\"type\":\"Scatter\"},{\"attributes\":{\"tools\":[{\"id\":\"11722\"},{\"id\":\"11723\"},{\"id\":\"11724\"},{\"id\":\"11725\"},{\"id\":\"11726\"},{\"id\":\"11727\"}]},\"id\":\"11729\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"12059\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"11722\",\"type\":\"PanTool\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"12065\"},\"group\":null,\"major_label_policy\":{\"id\":\"12066\"},\"ticker\":{\"id\":\"11719\"}},\"id\":\"11718\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"11710\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"11727\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"12076\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"background_fill_color\":\"#fafafa\",\"below\":[{\"id\":\"11751\"}],\"center\":[{\"id\":\"11754\"},{\"id\":\"11758\"}],\"height\":250,\"left\":[{\"id\":\"11755\"}],\"renderers\":[{\"id\":\"11777\"}],\"title\":{\"id\":\"12056\"},\"toolbar\":{\"id\":\"11766\"},\"width\":250,\"x_range\":{\"id\":\"11743\"},\"x_scale\":{\"id\":\"11747\"},\"y_range\":{\"id\":\"11745\"},\"y_scale\":{\"id\":\"11749\"}},\"id\":\"11742\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"11726\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"12077\",\"type\":\"Selection\"},{\"attributes\":{\"overlay\":{\"id\":\"11728\"}},\"id\":\"11724\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"11712\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"11706\",\"type\":\"DataRange1d\"}],\"root_ids\":[\"11779\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"027b1025-eb73-43a1-ac81-d6f5e4942136\",\"root_ids\":[\"11779\"],\"roots\":{\"11779\":\"b36781a7-ce5a-4f06-ace0-b9aa43f950b0\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "11779"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from bokeh.layouts import row\n",
    "\n",
    "# prepare some data\n",
    "x = list(range(11))\n",
    "y0 = x\n",
    "y1 = [10 - i for i in x]\n",
    "y2 = [abs(i - 5) for i in x]\n",
    "\n",
    "# create three plots with one renderer each\n",
    "s1 = figure(width=250, height=250, background_fill_color=\"#fafafa\")\n",
    "s1.circle(x, y0, size=12, color=\"#53777a\", alpha=0.8)\n",
    "\n",
    "s2 = figure(width=250, height=250, background_fill_color=\"#fafafa\")\n",
    "s2.triangle(x, y1, size=12, color=\"#c02942\", alpha=0.8)\n",
    "\n",
    "s3 = figure(width=250, height=250, background_fill_color=\"#fafafa\")\n",
    "s3.square(x, y2, size=12, color=\"#d95b43\", alpha=0.8)\n",
    "\n",
    "# put the results in a row and show\n",
    "show(row(s1, s2, s3))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "3fe79394-6aa2-4c18-b33e-3e1be0c11c55",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T00:53:35.016958Z",
     "iopub.status.busy": "2022-10-21T00:53:35.016362Z",
     "iopub.status.idle": "2022-10-21T00:53:35.328029Z",
     "shell.execute_reply": "2022-10-21T00:53:35.327620Z",
     "shell.execute_reply.started": "2022-10-21T00:53:35.016909Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"7d429398-1dd6-41c0-be46-d6508d60b7ff\" data-root-id=\"12824\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"f267a293-86e2-4443-b809-3a3ad3346e8f\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"12713\"},{\"id\":\"12750\"},{\"id\":\"12787\"}],\"sizing_mode\":\"scale_width\"},\"id\":\"12824\",\"type\":\"Row\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"13134\",\"type\":\"Title\"},{\"attributes\":{\"source\":{\"id\":\"12781\"}},\"id\":\"12786\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"13132\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"12792\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"12809\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"12797\",\"type\":\"BasicTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#c02942\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"#c02942\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#c02942\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"12784\",\"type\":\"Scatter\"},{\"attributes\":{\"axis\":{\"id\":\"12796\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"12799\",\"type\":\"Grid\"},{\"attributes\":{\"axis\":{\"id\":\"12800\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"12803\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"12801\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"12805\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"12804\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"12810\"}},\"id\":\"12806\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"12807\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"12808\",\"type\":\"ResetTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"12810\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"13149\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"13137\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"13150\",\"type\":\"AllLabels\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#d95b43\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"#d95b43\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#d95b43\"},\"marker\":{\"value\":\"square\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"12820\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"13152\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"13141\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"13153\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"13130\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"13140\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"13154\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"13155\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.8},\"fill_color\":{\"value\":\"#d95b43\"},\"hatch_alpha\":{\"value\":0.8},\"hatch_color\":{\"value\":\"#d95b43\"},\"line_alpha\":{\"value\":0.8},\"line_color\":{\"value\":\"#d95b43\"},\"marker\":{\"value\":\"square\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"12819\",\"type\":\"Scatter\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"12818\"},\"glyph\":{\"id\":\"12819\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"12821\"},\"nonselection_glyph\":{\"id\":\"12820\"},\"view\":{\"id\":\"12823\"}},\"id\":\"12822\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#d95b43\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"#d95b43\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#d95b43\"},\"marker\":{\"value\":\"square\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"12821\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"12768\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"13143\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"tools\":[{\"id\":\"12804\"},{\"id\":\"12805\"},{\"id\":\"12806\"},{\"id\":\"12807\"},{\"id\":\"12808\"},{\"id\":\"12809\"}]},\"id\":\"12811\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"13144\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"12781\"},\"glyph\":{\"id\":\"12782\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"12784\"},\"nonselection_glyph\":{\"id\":\"12783\"},\"view\":{\"id\":\"12786\"}},\"id\":\"12785\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"12788\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"13146\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"12818\"}},\"id\":\"12823\",\"type\":\"CDSView\"},{\"attributes\":{\"data\":{\"x\":[0,1,2,3,4,5,6,7,8,9,10],\"y\":[5,4,3,2,1,0,1,2,3,4,5]},\"selected\":{\"id\":\"13161\"},\"selection_policy\":{\"id\":\"13160\"}},\"id\":\"12818\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"13147\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"12790\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"12794\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"13152\"},\"group\":null,\"major_label_policy\":{\"id\":\"13153\"},\"ticker\":{\"id\":\"12797\"}},\"id\":\"12796\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"13149\"},\"group\":null,\"major_label_policy\":{\"id\":\"13150\"},\"ticker\":{\"id\":\"12801\"}},\"id\":\"12800\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"13157\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"13158\",\"type\":\"Selection\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"12744\"},\"glyph\":{\"id\":\"12745\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"12747\"},\"nonselection_glyph\":{\"id\":\"12746\"},\"view\":{\"id\":\"12749\"}},\"id\":\"12748\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"12767\",\"type\":\"PanTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"12773\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"12772\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"12760\",\"type\":\"BasicTicker\"},{\"attributes\":{\"background_fill_color\":\"#fafafa\",\"below\":[{\"id\":\"12759\"}],\"center\":[{\"id\":\"12762\"},{\"id\":\"12766\"}],\"height\":250,\"left\":[{\"id\":\"12763\"}],\"renderers\":[{\"id\":\"12785\"}],\"sizing_mode\":\"scale_width\",\"title\":{\"id\":\"13132\"},\"toolbar\":{\"id\":\"12774\"},\"width\":250,\"x_range\":{\"id\":\"12751\"},\"x_scale\":{\"id\":\"12755\"},\"y_range\":{\"id\":\"12753\"},\"y_scale\":{\"id\":\"12757\"}},\"id\":\"12750\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.8},\"fill_color\":{\"value\":\"#53777a\"},\"hatch_alpha\":{\"value\":0.8},\"hatch_color\":{\"value\":\"#53777a\"},\"line_alpha\":{\"value\":0.8},\"line_color\":{\"value\":\"#53777a\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"12745\",\"type\":\"Circle\"},{\"attributes\":{\"data\":{\"x\":[0,1,2,3,4,5,6,7,8,9,10],\"y\":[0,1,2,3,4,5,6,7,8,9,10]},\"selected\":{\"id\":\"13155\"},\"selection_policy\":{\"id\":\"13154\"}},\"id\":\"12744\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"12714\",\"type\":\"DataRange1d\"},{\"attributes\":{\"axis\":{\"id\":\"12759\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"12762\",\"type\":\"Grid\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#53777a\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"#53777a\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#53777a\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"12746\",\"type\":\"Circle\"},{\"attributes\":{\"background_fill_color\":\"#fafafa\",\"below\":[{\"id\":\"12722\"}],\"center\":[{\"id\":\"12725\"},{\"id\":\"12729\"}],\"height\":250,\"left\":[{\"id\":\"12726\"}],\"renderers\":[{\"id\":\"12748\"}],\"sizing_mode\":\"scale_width\",\"title\":{\"id\":\"13130\"},\"toolbar\":{\"id\":\"12737\"},\"width\":250,\"x_range\":{\"id\":\"12714\"},\"x_scale\":{\"id\":\"12718\"},\"y_range\":{\"id\":\"12716\"},\"y_scale\":{\"id\":\"12720\"}},\"id\":\"12713\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"12764\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"12716\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"12751\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"12720\",\"type\":\"LinearScale\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"13140\"},\"group\":null,\"major_label_policy\":{\"id\":\"13141\"},\"ticker\":{\"id\":\"12723\"}},\"id\":\"12722\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"13137\"},\"group\":null,\"major_label_policy\":{\"id\":\"13138\"},\"ticker\":{\"id\":\"12727\"}},\"id\":\"12726\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"12718\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.8},\"fill_color\":{\"value\":\"#c02942\"},\"hatch_alpha\":{\"value\":0.8},\"hatch_color\":{\"value\":\"#c02942\"},\"line_alpha\":{\"value\":0.8},\"line_color\":{\"value\":\"#c02942\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"12782\",\"type\":\"Scatter\"},{\"attributes\":{},\"id\":\"12734\",\"type\":\"ResetTool\"},{\"attributes\":{\"axis\":{\"id\":\"12763\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"12766\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"12723\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis\":{\"id\":\"12722\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"12725\",\"type\":\"Grid\"},{\"attributes\":{\"tools\":[{\"id\":\"12767\"},{\"id\":\"12768\"},{\"id\":\"12769\"},{\"id\":\"12770\"},{\"id\":\"12771\"},{\"id\":\"12772\"}]},\"id\":\"12774\",\"type\":\"Toolbar\"},{\"attributes\":{\"background_fill_color\":\"#fafafa\",\"below\":[{\"id\":\"12796\"}],\"center\":[{\"id\":\"12799\"},{\"id\":\"12803\"}],\"height\":250,\"left\":[{\"id\":\"12800\"}],\"renderers\":[{\"id\":\"12822\"}],\"sizing_mode\":\"scale_width\",\"title\":{\"id\":\"13134\"},\"toolbar\":{\"id\":\"12811\"},\"width\":250,\"x_range\":{\"id\":\"12788\"},\"x_scale\":{\"id\":\"12792\"},\"y_range\":{\"id\":\"12790\"},\"y_scale\":{\"id\":\"12794\"}},\"id\":\"12787\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"axis\":{\"id\":\"12726\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"12729\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"13160\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"12727\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"12735\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"13161\",\"type\":\"Selection\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#53777a\"},\"hatch_alpha\":{\"value\":0.2},\"hatch_color\":{\"value\":\"#53777a\"},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#53777a\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"12747\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"12731\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"12730\",\"type\":\"PanTool\"},{\"attributes\":{\"overlay\":{\"id\":\"12736\"}},\"id\":\"12732\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"data\":{\"x\":[0,1,2,3,4,5,6,7,8,9,10],\"y\":[10,9,8,7,6,5,4,3,2,1,0]},\"selected\":{\"id\":\"13158\"},\"selection_policy\":{\"id\":\"13157\"}},\"id\":\"12781\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"12733\",\"type\":\"SaveTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#c02942\"},\"hatch_alpha\":{\"value\":0.1},\"hatch_color\":{\"value\":\"#c02942\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#c02942\"},\"marker\":{\"value\":\"triangle\"},\"size\":{\"value\":12},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"12783\",\"type\":\"Scatter\"},{\"attributes\":{\"source\":{\"id\":\"12744\"}},\"id\":\"12749\",\"type\":\"CDSView\"},{\"attributes\":{\"tools\":[{\"id\":\"12730\"},{\"id\":\"12731\"},{\"id\":\"12732\"},{\"id\":\"12733\"},{\"id\":\"12734\"},{\"id\":\"12735\"}]},\"id\":\"12737\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"12757\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"12753\",\"type\":\"DataRange1d\"},{\"attributes\":{},\"id\":\"13138\",\"type\":\"AllLabels\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"13146\"},\"group\":null,\"major_label_policy\":{\"id\":\"13147\"},\"ticker\":{\"id\":\"12760\"}},\"id\":\"12759\",\"type\":\"LinearAxis\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"13143\"},\"group\":null,\"major_label_policy\":{\"id\":\"13144\"},\"ticker\":{\"id\":\"12764\"}},\"id\":\"12763\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"12771\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"12755\",\"type\":\"LinearScale\"},{\"attributes\":{\"overlay\":{\"id\":\"12773\"}},\"id\":\"12769\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"12736\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"12770\",\"type\":\"SaveTool\"}],\"root_ids\":[\"12824\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"f267a293-86e2-4443-b809-3a3ad3346e8f\",\"root_ids\":[\"12824\"],\"roots\":{\"12824\":\"7d429398-1dd6-41c0-be46-d6508d60b7ff\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "12824"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from bokeh.layouts import row\n",
    "\n",
    "# prepare some data\n",
    "x = list(range(11))\n",
    "y0 = x\n",
    "y1 = [10 - i for i in x]\n",
    "y2 = [abs(i - 5) for i in x]\n",
    "\n",
    "# create three plots with one renderer each\n",
    "s1 = figure(width=250, height=250, background_fill_color=\"#fafafa\")\n",
    "s1.circle(x, y0, size=12, color=\"#53777a\", alpha=0.8)\n",
    "\n",
    "s2 = figure(width=250, height=250, background_fill_color=\"#fafafa\")\n",
    "s2.triangle(x, y1, size=12, color=\"#c02942\", alpha=0.8)\n",
    "\n",
    "s3 = figure(width=250, height=250, background_fill_color=\"#fafafa\")\n",
    "s3.square(x, y2, size=12, color=\"#d95b43\", alpha=0.8)\n",
    "\n",
    "# put the results in a row that automatically adjusts\n",
    "# to the browser window's width\n",
    "show(row(children=[s1, s2, s3], sizing_mode=\"scale_width\"))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e8fe3690-9df6-4ebf-8c33-5d5f0a613e6c",
   "metadata": {},
   "source": [
    "# 保存输出"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c3613b80-0ea5-4b53-a209-43717d83531b",
   "metadata": {},
   "source": [
    "## 保存网页"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f1473088-11d3-4c5f-a986-e63f5402f14c",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T15:54:08.212610Z",
     "iopub.status.busy": "2022-10-21T15:54:08.212423Z",
     "iopub.status.idle": "2022-10-21T15:54:08.271794Z",
     "shell.execute_reply": "2022-10-21T15:54:08.271403Z",
     "shell.execute_reply.started": "2022-10-21T15:54:08.212590Z"
    }
   },
   "outputs": [],
   "source": [
    "from bokeh.plotting import figure, output_file, save\n",
    "\n",
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [4, 5, 5, 7, 2]\n",
    "\n",
    "# set output to static HTML file\n",
    "output_file(filename=\"custom_filename.html\", title=\"Static HTML file\")\n",
    "\n",
    "# create a new plot with a specific size\n",
    "p = figure(sizing_mode=\"stretch_width\", max_width=500, height=250)\n",
    "\n",
    "# add a circle renderer\n",
    "circle = p.circle(x, y, fill_color=\"red\", size=15)\n",
    "\n",
    "# save the results to a file\n",
    "save(p)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "729445c5-0302-4e0d-ab87-053b403ae0fe",
   "metadata": {},
   "source": [
    "## 保存图片"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bee9f651-a203-483d-849e-d100f26243d0",
   "metadata": {},
   "outputs": [],
   "source": [
    "from bokeh.io import export_png\n",
    "from bokeh.plotting import figure\n",
    "\n",
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5]\n",
    "y = [4, 5, 5, 7, 2]\n",
    "\n",
    "# create a new plot with fixed dimensions\n",
    "p = figure(width=350, height=250)\n",
    "\n",
    "# add a circle renderer\n",
    "circle = p.circle(x, y, fill_color=\"red\", size=15)\n",
    "\n",
    "# save the results to a file\n",
    "export_png(p, filename=\"plot.png\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a01b14cf-c87c-4ace-8e81-84c557bd4f59",
   "metadata": {},
   "source": [
    "# 交互式画图"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "941788bb-1557-4a5a-80d8-2006c91f6918",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-10-21T15:57:42.729687Z",
     "iopub.status.busy": "2022-10-21T15:57:42.729028Z",
     "iopub.status.idle": "2022-10-21T15:57:42.929755Z",
     "shell.execute_reply": "2022-10-21T15:57:42.929287Z",
     "shell.execute_reply.started": "2022-10-21T15:57:42.729636Z"
    },
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "\n",
       "  <div class=\"bk-root\" id=\"77a6a2e6-5941-4196-84ec-77c3eb98fe4d\" data-root-id=\"14247\"></div>\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "(function(root) {\n",
       "  function embed_document(root) {\n",
       "    \n",
       "  const docs_json = {\"ed13f63a-1379-40d5-923d-dbbc90384808\":{\"defs\":[],\"roots\":{\"references\":[{\"attributes\":{\"children\":[{\"id\":\"14244\"},{\"id\":\"14245\"},{\"id\":\"14246\"}]},\"id\":\"14247\",\"type\":\"Column\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#21a7df\"},\"hatch_alpha\":{\"value\":0.1},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":30},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"14234\",\"type\":\"Circle\"},{\"attributes\":{\"args\":{\"other\":{\"id\":\"14233\"}},\"code\":\"other.size = this.value\"},\"id\":\"14240\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"14595\",\"type\":\"Selection\"},{\"attributes\":{\"fill_color\":{\"value\":\"#21a7df\"},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":30},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"14233\",\"type\":\"Circle\"},{\"attributes\":{\"children\":[{\"id\":\"14238\"},{\"id\":\"14239\"}]},\"id\":\"14244\",\"type\":\"Row\"},{\"attributes\":{},\"id\":\"14592\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"14204\",\"type\":\"DataRange1d\"},{\"attributes\":{\"children\":[{\"id\":\"14201\"}]},\"id\":\"14246\",\"type\":\"Row\"},{\"attributes\":{\"coordinates\":null,\"data_source\":{\"id\":\"14232\"},\"glyph\":{\"id\":\"14233\"},\"group\":null,\"hover_glyph\":null,\"muted_glyph\":{\"id\":\"14235\"},\"nonselection_glyph\":{\"id\":\"14234\"},\"view\":{\"id\":\"14237\"}},\"id\":\"14236\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"children\":[{\"id\":\"14241\"}]},\"id\":\"14245\",\"type\":\"Row\"},{\"attributes\":{},\"id\":\"14594\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"14208\",\"type\":\"LinearScale\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.2},\"fill_color\":{\"value\":\"#21a7df\"},\"hatch_alpha\":{\"value\":0.2},\"line_alpha\":{\"value\":0.2},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"value\":30},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"14235\",\"type\":\"Circle\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"14589\"},\"group\":null,\"major_label_policy\":{\"id\":\"14590\"},\"ticker\":{\"id\":\"14215\"}},\"id\":\"14214\",\"type\":\"LinearAxis\"},{\"attributes\":{\"source\":{\"id\":\"14232\"}},\"id\":\"14237\",\"type\":\"CDSView\"},{\"attributes\":{\"coordinates\":null,\"formatter\":{\"id\":\"14592\"},\"group\":null,\"major_label_policy\":{\"id\":\"14593\"},\"ticker\":{\"id\":\"14211\"}},\"id\":\"14210\",\"type\":\"LinearAxis\"},{\"attributes\":{\"end\":10,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"14242\"},{\"id\":\"14243\"}]},\"start\":0,\"title\":\"Adjust x-axis range\",\"value\":[1,9]},\"id\":\"14241\",\"type\":\"RangeSlider\"},{\"attributes\":{\"axis\":{\"id\":\"14210\"},\"coordinates\":null,\"group\":null,\"ticker\":null},\"id\":\"14213\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"14223\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"14211\",\"type\":\"BasicTicker\"},{\"attributes\":{\"height\":30,\"text\":\"\\n          <p>Select the circle's size using this control element:</p>\\n          \",\"width\":200},\"id\":\"14238\",\"type\":\"Div\"},{\"attributes\":{\"args\":{\"other\":{\"id\":\"14202\"}},\"code\":\"other.start = this.value[0]\"},\"id\":\"14242\",\"type\":\"CustomJS\"},{\"attributes\":{},\"id\":\"14206\",\"type\":\"LinearScale\"},{\"attributes\":{\"args\":{\"other\":{\"id\":\"14202\"}},\"code\":\"other.end = this.value[1]\"},\"id\":\"14243\",\"type\":\"CustomJS\"},{\"attributes\":{\"axis\":{\"id\":\"14214\"},\"coordinates\":null,\"dimension\":1,\"group\":null,\"ticker\":null},\"id\":\"14217\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"14215\",\"type\":\"BasicTicker\"},{\"attributes\":{\"bottom_units\":\"screen\",\"coordinates\":null,\"fill_alpha\":0.5,\"fill_color\":\"lightgrey\",\"group\":null,\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":1.0,\"line_color\":\"black\",\"line_dash\":[4,4],\"line_width\":2,\"right_units\":\"screen\",\"syncable\":false,\"top_units\":\"screen\"},\"id\":\"14224\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"below\":[{\"id\":\"14210\"}],\"center\":[{\"id\":\"14213\"},{\"id\":\"14217\"}],\"height\":250,\"left\":[{\"id\":\"14214\"}],\"renderers\":[{\"id\":\"14236\"}],\"title\":{\"id\":\"14586\"},\"toolbar\":{\"id\":\"14225\"},\"width\":500,\"x_range\":{\"id\":\"14202\"},\"x_scale\":{\"id\":\"14206\"},\"y_range\":{\"id\":\"14204\"},\"y_scale\":{\"id\":\"14208\"}},\"id\":\"14201\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"14589\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"14593\",\"type\":\"AllLabels\"},{\"attributes\":{\"tools\":[{\"id\":\"14218\"},{\"id\":\"14219\"},{\"id\":\"14220\"},{\"id\":\"14221\"},{\"id\":\"14222\"},{\"id\":\"14223\"}]},\"id\":\"14225\",\"type\":\"Toolbar\"},{\"attributes\":{\"data\":{\"x\":[1,2,3,4,5,6,7,8,9,10],\"y\":[4,5,5,7,2,6,4,9,1,3]},\"selected\":{\"id\":\"14595\"},\"selection_policy\":{\"id\":\"14594\"}},\"id\":\"14232\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"end\":9,\"start\":1},\"id\":\"14202\",\"type\":\"Range1d\"},{\"attributes\":{},\"id\":\"14221\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"14218\",\"type\":\"PanTool\"},{\"attributes\":{},\"id\":\"14222\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"14590\",\"type\":\"AllLabels\"},{\"attributes\":{},\"id\":\"14219\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"overlay\":{\"id\":\"14224\"}},\"id\":\"14220\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"coordinates\":null,\"group\":null},\"id\":\"14586\",\"type\":\"Title\"},{\"attributes\":{\"high\":60,\"js_property_callbacks\":{\"change:value\":[{\"id\":\"14240\"}]},\"low\":0,\"step\":5,\"title\":\"Circle size\",\"value\":30,\"value_throttled\":30,\"width\":200},\"id\":\"14239\",\"type\":\"Spinner\"}],\"root_ids\":[\"14247\"]},\"title\":\"Bokeh Application\",\"version\":\"2.4.2\"}};\n",
       "  const render_items = [{\"docid\":\"ed13f63a-1379-40d5-923d-dbbc90384808\",\"root_ids\":[\"14247\"],\"roots\":{\"14247\":\"77a6a2e6-5941-4196-84ec-77c3eb98fe4d\"}}];\n",
       "  root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
       "\n",
       "  }\n",
       "  if (root.Bokeh !== undefined) {\n",
       "    embed_document(root);\n",
       "  } else {\n",
       "    let attempts = 0;\n",
       "    const timer = setInterval(function(root) {\n",
       "      if (root.Bokeh !== undefined) {\n",
       "        clearInterval(timer);\n",
       "        embed_document(root);\n",
       "      } else {\n",
       "        attempts++;\n",
       "        if (attempts > 100) {\n",
       "          clearInterval(timer);\n",
       "          console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\");\n",
       "        }\n",
       "      }\n",
       "    }, 10, root)\n",
       "  }\n",
       "})(window);"
      ],
      "application/vnd.bokehjs_exec.v0+json": ""
     },
     "metadata": {
      "application/vnd.bokehjs_exec.v0+json": {
       "id": "14247"
      }
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from bokeh.layouts import layout\n",
    "from bokeh.models import Div, RangeSlider, Spinner\n",
    "from bokeh.plotting import figure, show\n",
    "\n",
    "# prepare some data\n",
    "x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n",
    "y = [4, 5, 5, 7, 2, 6, 4, 9, 1, 3]\n",
    "\n",
    "# create plot with circle glyphs\n",
    "p = figure(x_range=(1, 9), width=500, height=250)\n",
    "points = p.circle(x=x, y=y, size=30, fill_color=\"#21a7df\")\n",
    "\n",
    "# set up textarea (div)\n",
    "div = Div(\n",
    "    text=\"\"\"\n",
    "          <p>Select the circle's size using this control element:</p>\n",
    "          \"\"\",\n",
    "    width=200,\n",
    "    height=30,\n",
    ")\n",
    "\n",
    "# set up spinner\n",
    "spinner = Spinner(\n",
    "    title=\"Circle size\",\n",
    "    low=0,\n",
    "    high=60,\n",
    "    step=5,\n",
    "    value=points.glyph.size,\n",
    "    width=200,\n",
    ")\n",
    "spinner.js_link(\"value\", points.glyph, \"size\")\n",
    "\n",
    "# set up RangeSlider\n",
    "range_slider = RangeSlider(\n",
    "    title=\"Adjust x-axis range\",\n",
    "    start=0,\n",
    "    end=10,\n",
    "    step=1,\n",
    "    value=(p.x_range.start, p.x_range.end),\n",
    ")\n",
    "range_slider.js_link(\"value\", p.x_range, \"start\", attr_selector=0)\n",
    "range_slider.js_link(\"value\", p.x_range, \"end\", attr_selector=1)\n",
    "\n",
    "# create layout\n",
    "layout = layout(\n",
    "    [\n",
    "        [div, spinner],\n",
    "        [range_slider],\n",
    "        [p],\n",
    "    ]\n",
    ")\n",
    "\n",
    "# show result\n",
    "show(layout)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3372fc02-a17e-4503-bf9b-6b4e05924d2b",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3.10"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.10"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "state": {},
    "version_major": 2,
    "version_minor": 0
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
